총 16,343건
CVE-2026-90015
2026년 9월 16일In the Linux kernel, the following vulnerability has been resolved: xhci: fix lost bounce buffers on TDs spanning several ring segments When a TD reaches a link TRB with data that is not aligned to the endpoint's wMaxPacketSize, xhci_align_td() stages the unalignable tail through the bounce buffer of the ring segment holding that link TRB. xhci_unmap_td_bounce_buffer() later unmaps it and, for IN transfers, copies the data back into the URB's buffer. The enqueue path records the segment that was bounced in td->bounce_seg, under the assumption that a TD never spans more than two ring segments. That assumption does not hold: a TD large enough to span three or more segments crosses several link TRBs and can be bounced at each of them. Only the last one survives in td->bounce_seg, so every earlier bounce buffer is neither copied back nor DMA unmapped. The URB still completes with actual_length equal to the requested length and no error, so the transfer looks successful while a wMaxPacketSize sized hole in the destination buffer silently keeps its previous contents. It also leaks a DMA mapping per dropped bounce. Any sufficiently large and fragmented bulk transfer can hit this. It was found with a USB mass storage device behind xHCI backing a dm-verity target with 512 byte hash blocks, where the stale data is detected rather than silently consumed. The device enumerates as SuperSpeed, so wMaxPacketSize is 1024, while dm-bufio issues one 512 byte bio per hash block. verity_prefetch_io() makes the block layer merge hundreds of them into a single request of up to 512 scatterlist entries of 512 bytes each. At 256 TRBs per ring segment such a TD spans three segments, and every segment boundary falls on an odd multiple of 512, i.e. unaligned to wMaxPacketSize. dm-bufio then caches a hash block holding stale data and dm-verity declares the metadata block corrupted: device-mapper: verity: 8:2: metadata block 10850 is corrupted A reproducer running this under qemu is available at https://github.com/baloo/xhci-verity The bounce state (bounce_buf, bounce_dma, bounce_len, bounce_offs) already lives on the ring segment, so there is nothing extra to track. Keep recording the last bounced segment in td->bounce_seg and, on completion, walk the segments from td->start_seg up to it, unmapping every segment that still has a pending bounce. Stopping at td->bounce_seg rather than td->end_seg matters: a bounce implies the TD continues past that segment's link TRB, so bounce_seg is always strictly before end_seg, and a later TD may already have started in end_seg and been bounced there. Walking that far would copy a foreign bounce buffer into this URB and unmap it twice. It also keeps the walk correct if a TD ever wraps the whole ring so that end_seg == start_seg. [mn: Add ring->num_segs check to prevent unlikely infinite for loop.]
CVE-2026-90014
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: tracing: show_event_filters/triggers 파일이 trace array 참조를 갖도록 변경 새로 추가된 show_event_filters 및 show_event_triggers 파일은 trace array 내에 설정된 모든 필터 또는 트리거를 보여주지만, 이들이 보여주는 trace array에 대한 참조를 갖지 않는다. 참조를 갖지 않으면, 작업이 이 파일들 중 하나를 읽는 동안 "rmdir"을 통해 trace_array가 해제될 수 있다. 이 파일들은 인스턴스(trace_array) 내의 모든 이벤트를 반복하며, 데이터가 읽히는 동안 해당 인스턴스가 해제되는 것을 막는 장치가 없다. 이로 인해 해제 후 사용(use-after-free) 충돌이 발생한다. 이 두 파일을 열 때 trace_array_get()을 통해 trace_array 참조를 갖도록 하여, 파일이 열려 있는 동안 trace_array가 해제되는 것을 방지한다.
CVE-2026-90013
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: tracing: 옵션 파일을 열 때 trace_array 참조를 취득함 옵션 파일들은 자신들이 나타내는 옵션에 대해 trace_array 참조를 취득하지 않는다. 이로 인해 한 작업이 이러한 파일 중 하나를 열고 다른 작업이 해당 옵션의 인스턴스를 제거하면 use-after-free 커널 충돌이 발생할 수 있다. 열 때 참조를 취득하지 않기 때문에 제거를 막지 못하며, 이로 인해 사용 중인 옵션 설명자가 해제된다. 옵션들은 부팅 시 다소 동적으로 생성되므로 각 파일은 trace_array 내의 플래그를 나타낸다. trace_array는 trace_flags_index 배열에 저장된 각 플래그를 나타내는 인덱스 배열을 가진다. 인덱스 배열 요소의 주소가 inode->i_private 포인터에 전달된다. 그런 다음 해당 요소를 읽어 인덱스(플래그를 나타냄)를 얻고, 이 인덱스를 사용해 trace_flags_index 배열에서 trace_array 설명자를 계산한다. 문제는 trace_array의 참조가 취득되기 전까지 인덱스 요소를 참조할 수 없다는 것이다. 이를 처리하기 위해 trace_array_options_get()라는 새로운 헬퍼 함수를 생성했다. 이 함수는 ftrace_trace_arrays 리스트(under trace_types_lock) 내의 모든 기존 trace_array를 반복하며, 전달된 인덱스 요소 주소를 trace_array의 trace_flags_index 배열 전체와 비교한다. 일치하면 해당 trace_array의 참조를 증가시키고 반환한다.
CVE-2026-90012
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: spi: 부분 매핑 실패 시 DMA 매핑 소유권 수정 TX 매핑이 성공한 후 RX 매핑이 실패하면, __spi_map_msg()는 TX를 언맵하지만 tx_sg_mapped는 설정된 상태로 남아 있다. 이후 전송에서 TX 매핑이 실패하면 이전 전송을 위해 생성된 매핑이 활성 상태로 남아 있다. 두 경우 모두 cur_{tx,rx}_dma_dev는 아직 업데이트되지 않았는데, 이는 모든 전송이 매핑된 후에만 할당되기 때문이다. 따라서 이후의 spi_unmap_msg()는 TX 매핑을 다시 언맵하거나 NULL 또는 오래된 장치를 사용하여 이전 매핑을 해제할 수 있다. NULL 장치를 사용하면 oops가 발생할 수 있다. 빈 SG 테이블은 dma_unmap_sg_attrs()가 엔트리 수를 확인하기 전에 장치에 접근하기 때문에 NULL 역참조를 방지하지 못한다. 매핑이 시작되기 전에 두 매핑 장치를 공개하고 모든 실패를 __spi_unmap_msg()를 통해 되돌린다. 이는 매핑 플래그를 지우고 각 매핑을 생성한 장치로 한 번씩 해제한다. 루프 전에 장치를 공개하면 매핑이 필요 없는 경우에도 장치가 갱신된다. 이 경우 매핑 플래그가 설정되지 않아 현재 사용자가 포인터를 매핑 소유자로 사용하지 않는다.
CVE-2026-90011
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: scsi: target: iscsi: 로그인 페이로드를 위한 종료 바이트 예약 iscsi_target_check_login_request()는 DataSegmentLength가 MAX_KEY_VALUE_PAIRS를 초과하는 로그인 PDU를 거부하지만, 테스트는 '>'이고 login->req_buf는 정확히 MAX_KEY_VALUE_PAIRS 바이트로 할당된다. iscsit_get_login_rx()는 payload_length + padding 바이트를 받는데, padding = ((-payload_length) & 3); 8189부터 8192까지의 모든 payload_length는 전체 8192 바이트 버퍼를 채운다. 쓰기는 범위 내에 머무르지만 NUL 종료자를 위한 바이트가 남지 않는다. 이 버퍼는 이후 C 문자열로 사용된다. CHAP 경로에서 chap_check_algorithm()은 kstrdup(a_str)를 호출하고, extract_param()은 길이를 고려하지 않고 strstr(in_buf, pattern)과 strlen_semi()를 호출한다. convert_null_to_semi()는 모든 내장된 NUL을 ';'로 다시 쓰므로, 잘 형성된 NUL로 구분된 key=value 레코드로 이루어진 페이로드도 종료자가 없다. 이들은 객체 끝을 넘어 인접한 슬랩 메모리로 넘어간다. 이는 인증되지 않은 이니시에이터가 CHAP로 구성된 포털에 접근할 수 있다; 인증이 필요하지 않을 때 iscsi_login_zero_tsih_s2()는 AuthMethod를 None으로 다시 쓰며 CHAP 경로는 절대 진입하지 않는다. 추가 바이트 하나를 할당한다. kzalloc()은 이를 0으로 초기화하며, 어떤 쓰기도 하지 않는다. 모든 작성자는 최대 MAX_KEY_VALUE_PAIRS 바이트를 오프셋 0에 복사하므로 버퍼는 항상 종료된다.
CVE-2026-90010
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: scsi: bsg: io_uring 감지 복사를 max_response_len으로 제한 완료 시 scmd->sense_len을 max_response_len을 고려하지 않고 사용자 응답 버퍼에 복사하였다. 유효한 센스 후 미들레이어는 sense_len을 실제 길이(SCSI_SENSE_BUFFERSIZE까지)로 설정하므로, 더 작은 사용자 버퍼가 오버런되었다.
CVE-2026-90009
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: scsi: bsg: io_uring 패스스루 명령어 설정에서 TOCTOU 수정 scsi_bsg_uring_cmd()는 공유 mmap된 SQE에서 bsg_uring_cmd를 읽는다. 사용자 공간은 우리가 필드를 확인한 후 그리고 사용하기 전에 필드를 변경할 수 있다. request_len이 대표적인 사례로, 경계 검사 후 sizeof(scmd->cmnd)를 초과하여 증가할 수 있으며 copy_from_user()에서 scmd->cmnd를 오버플로할 수 있다. 사용 전에 확인하거나 사용하는 SQE 필드를 READ_ONCE()로 로컬 변수에 읽는다.
CVE-2026-90008
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: scsi: megaraid_sas: NVMe 요청 크기를 PRP 체인 프레임으로 제한 megasas_make_prp_nvme() 함수는 cmd->sg_frame에 명령의 PRP 리스트를 생성하는데, 이는 instance->max_chain_frame_sz 바이트 크기의 DMA 풀 버퍼이며, 전송되는 NVMe 페이지마다 하나씩, 그리고 체인 포인터용 페이지마다 하나씩 항목을 사용한다. 이 루프는 전송이 설명될 때까지 실행되며 버퍼 경계를 검사하지 않는다. max_hw_sectors는 펌웨어가 드라이브에 대해 보고하는 MDTS에서 직접 가져온다. 큰 MDTS를 가진 드라이브에서는 리스트를 버퍼 내에 유지하는 유일한 요소가 블록 계층의 기본값인 1280 KiB였는데, 이는 320개의 항목이 필요하며 4 KiB 프레임에 512개가 들어가므로 적합했다. 그러나 커밋 9b8b84879d4a("block: Increase BLK_DEF_MAX_SECTORS_CAP") 이후 기본값이 4 MiB로 증가했고, 이러한 전송에는 1025개의 항목이 필요하여 리스트가 프레임 끝을 한 페이지 넘어서게 된다: sd 1:0:1:0: [sdb] tag#630 page boundary ptr_sgl: 0x00000000ba62d13f BUG: unable to handle page fault for address: ff663bcb81e7c000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page RIP: 0010:megasas_build_and_issue_cmd_fusion+0xeaa/0x1870 [megaraid_sas] 프레임 다음 페이지가 매핑되어 있으면, 오버런이 오류를 발생시키지 않고 조용히 인접한 풀 항목을 손상시키는데, 이는 또 다른 진행 중인 명령의 PRP 리스트이다. max_hw_sectors를 체인 프레임이 설명할 수 있는 크기로 제한하며, 페이지 경계에서 시작하지 않아 항목이 하나 더 필요한 전송을 위해 한 페이지를 뺀다. 이는 커밋 04631f55afc5("scsi: mpt3sas: Limit NVMe request size to 2 MiB")의 megaraid_sas 대응이며, 하드코딩 대신 max_chain_frame_sz에서 제한을 도출한다.
CVE-2026-90007
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: scsi: pm8001: MSI-X 벡터 해제 시 롤백 인덱스 사용 pm8001_request_msix()는 request_irq()가 실패할 때 이전에 등록된 핸들러들을 free_irq()로 되돌린다. 롤백 루프는 이미 등록된 벡터 인덱스 j 대신 실패한 인덱스 i를 매 반복마다 사용한다. 이로 인해 free_irq()에 잘못된 IRQ/dev_id 쌍이 전달되어 이전 핸들러들이 남아 있게 된다. 롤백 루프에서 pci_irq_vector()와 일치하는 irq_vector 항목 모두에 대해 j를 사용해야 한다.
CVE-2026-90006
2026년 9월 16일In the Linux kernel, the following vulnerability has been resolved: samples/damon/mtier: handle damon_stop() failure damon_sample_mtier_stop() assumes its damon_stop() call will always successfully stops the two DAMON contexts. Hence it deallocates the two DAMON contexts after the damon_stop() call. However, if a given context is already stopped, damon_stop() fails and returns an error while letting the DAMON contexts that have not yet stopped keep running. This kind of unexpected early DAMON context stops could happen due to memory allocation failures in kdamond_fn(). Because damon_sample_mtier_stop() just deallocates all DAMON contexts with damon_target and damon_region objects that are linked to the contexts, the execution of the unstopped DAMON context (kdamond) ends up using the memory that freed (use-after-free). Fix the issue by separating the damon_stop() to be invoked per context. Note that DAMON_SYSFS also allows multiple DAMON contexts execution. But, it calls damon_stop() for each context one by one. Hence this issue is only in mtier. For the long term, it would be better to refactor damon_stop() to always ensure stopping all contexts regardless of the failures in the middle. Make this fix in the current way, though, to keep it simple and easy to backport. I will do the refactoring later. The issue was discovered [1] by Sashiko.
CVE-2026-90005
2026년 9월 16일In the Linux kernel, the following vulnerability has been resolved: samples/damon/wsse: handle damon_start() failure Patch series "samples/damon: handle damon_{start,stop}() failures". All DAMON sample modules are not correctly handling failures from damon_start(). Among those, mtier also has an additional problem for handling of damon_stop() failures. wsse and prcl also have a problem in their damon_call() failure handling. As a result, memory leaks, next DAMON operation disruptions, and use-after-free can happen. Fix those. Note that only the damon_start() failure caused issues can reliably be reproduced. Reproducing those issues require the admin permission, though. This patch (of 6): damon_sample_wsse_start() callers assume it will clean up resources when it fails. And the function does the cleanup for context buildup failures. However, it is not doing the cleanup for damon_start() failure. As a result, when damon_start() fails, it leaks the memory for DAMON context. Free the context in case of the failure to fix the issues. Note that the issue can reliably be reproduced because the module calls damon_start() in the exclusive mode. For example, $ sudo damo start $ echo $$ | sudo tee /sys/module/damon_sample_wsse/parameters/target_pid $ echo Y | sudo tee /sys/module/damon_sample_wsse/parameters/enabled $ sudo cat /proc/allocinfo | grep damon_new_ctx Because the first command is running another DAMON instance, the third command fails the damon_start() call because the new DAMON instance cannot exclusively run. And without this fix, by repeating the third and the fourth commands above, we can show the memory consumption is only increasing due to the leaks. It requires the sudo permission though. The issue was discovered [1] by Sashiko.
CVE-2026-90004
2026년 9월 16일In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: handle region split failure in apply_min_nr_regions() damon_apply_min_nr_regions() repeatedly split each region until its size becomes small enough to meet the user-defined low limit of the number of regions. The loop assumes the split operation (damon_split_region_at()) will always succeed and create the new region. But the operation could silently fail for memory allocation failures, for example. If such failure happens and the region was the last region, the linked list-based next region fetching returns invalid pointer. As a result, invalid memory dereference and corruption could happen. Even if the corner case is handled, it imposes stress to the allocator by trying split regions for other targets. Fix the issue by breaking all the loops for any region split failure. This means there could be a min_nr_regions violation. It will only rarely happen since the allocation is arguably too small to fail. Even if it happens, it is only temporal. damon_apply_min_nr_regions() will be called again after the aggregation interval. The user impact of the issue should be minor, since the allocation is arguably too small to fail. But, it could still theoretically happen, and the consequence is very bad. This issue was discovered [1] by Sashiko.
CVE-2026-90003
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: futex: requeue PI 중 rcuwait 해제 후 사용(use-after-free) 방지 PREEMPT_RT에서 FUTEX_CMP_REQUEUE_PI는 futex_requeue_pi_complete() 내 rcuwait_wake_up() 호출 시 KASAN 보고서(slab-out-of-bounds)를 유발할 수 있다. futex_wait_requeue_pi()에서 사용하는 futex_q는 대기자의 스택에 할당된다. 조기 웨이크업은 다음과 같이 PI 재큐와 경쟁 조건을 일으킬 수 있다: 대기자 재큐 작업 ------ ------------ futex_wait_requeue_pi() futex_do_wait() schedule() futex_requeue futex_proxy_trylock_atomic() futex_requeue_pi_prepare() Q_REQUEUE_PI_NONE -> Q_REQUEUE_PI_IN_PROGRESS * 타임아웃/신호가 대기자를 깨움 * futex_requeue_pi_wakeup_sync() Q_REQUEUE_PI_IN_PROGRESS -> Q_REQUEUE_PI_WAIT requeue_pi_wake_futex futex_requeue_pi_complete() cmpxchg Q_REQUEUE_PI_WAIT -> Q_REQUEUE_PI_LOCKED rcuwait_wait_event() if (atomic_read(&q->requeue_state) != Q_REQUEUE_PI_WAIT) break /* schedule() 없음 */ /* q.pi_state->owner == current */ futex_private_hash_put() /* 시스템 호출에서 반환 */ rcuwait_wake_up(&q->requeue_wait) /* q는 사라짐 */ futex_requeue_pi_complete()는 rcuwait_wake_up() 호출 전에 Q_REQUEUE_PI_LOCKED 상태를 게시한다. 대기자는 rcuwait_wait_event()에서 이 상태를 관찰한 후 schedule()을 호출한다. 여기서 대기자는 재큐 작업이 웨이크를 완료하기 전에 시스템 호출을 떠날 수 있다. 이 경쟁 조건을 해결하기 위해 Q_REQUEUE_PI_LOCKED 상태에서는 rcuwait_wake_up() 호출을 건너뛴다. 이 상태는 requeue_pi_wake_futex()에 의해서만 게시되며, 이 함수는 futex_requeue_pi_complete() 전에 q->task를 저장하고 wake_up_state()를 통해 대기자를 깨운다. 이 웨이크는 대기자를 futex_do_wait() 수면 상태에서 깨우기 위한 것이다. 대기자가 여전히 수면 중이라면 Q_REQUEUE_PI_WAIT 상태에 들어갈 수 없으며(이 제거된 웨이크가 필요함), 다른 수단으로 futex_do_wait()에서 대기자가 깨워져 futex_requeue_pi_wakeup_sync()에서 수면 상태라면 requeue_pi_wake_futex()의 wake_up_state()가 대기자를 깨운다. 대기자 작업이 wake_up_state()가 작업을 깨울 기회를 갖기 전에 종료되더라도, futex_hash_bucket::lock이 유지되고 작업 포인터가 RCU 보호를 받기 때문에 작업 포인터는 무효화되지 않는다. [bigeasy: 주석 및 커밋 메시지 업데이트됨]
CVE-2026-90002
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: ftrace: ftrace_ops에 접근하기 전에 trace_array 참조를 취득함 trace 인스턴스 파일인 set_ftrace_filter와 set_ftrace_notrace가 특정 trace 인스턴스(trace_arrays)와 함께 작동하도록 업데이트되었다. 문제는 이 파일들이 열릴 때 inode->private 포인터에서 ftrace_ops를 사용하여 trace_array에 대한 참조를 얻고 그 참조를 취득하는 작은 경쟁 조건이 존재한다는 것이다. 문제는 ftrace_ops 자체가 해제될 수 있다는 점이다. 인스턴스에 대해 rmdir가 set_ftrace_filter 파일이 열리는 동시에 발생하면, rmdir가 ftrace_ops를 해제할 수 있고 이를 참조하면 해제 후 사용(use-after-free) 버그가 발생하여 커널이 충돌할 수 있다. 대신, trace_array를 파일의 private 데이터로 전달하고(최상위 인스턴스는 NULL), trace_array와 ftrace_ops를 ftrace_regex_open() 함수에 전달한다. trace_array가 NULL이면 참조를 취득할 필요 없이 ftrace_ops만 사용한다(일반적인 경우와 동일). ftrace_ops가 NULL인 경우는 최상위 인스턴스에만 해당하며 global_ops를 사용할 수 있다. 이로 인해 인스턴스가 해제될 때도 해제될 수 있는 ftrace_ops에 접근하기 전에 trace_array의 참조가 증가된다.
CVE-2026-90001
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: HID: bpf: struct_ops 파괴 경로에서 장치 참조 해제를 직렬화 __hid_bpf_ops_destroy_device()와 hid_bpf_unreg()가 동일한 등록 참조에 대해 경쟁 상태가 발생하여 struct hid_device를 두 번 해제하고 hid_destroy_device()가 여전히 이를 사용하는 동안 해제할 수 있다. hdev->bpf.prog_list_lock 아래에서 제거/NULL 결정을 직렬화하여 각 경로가 정확히 하나의 등록 참조를 해제하도록 한다: unreg는 잠금 하에서 ops->hdev를 재확인하고 파괴 경로가 이미 이를 해제했으면 put 없이 반환한다; 모든 put_device() 호출은 잠금 해제 후에 발생하며, 이는 동시 unreg가 잠금 하에서 ops->hdev == NULL을 관찰하기 때문에 안전하다. 배경: 각 성공적인 첨부(hid_bpf_ops_reg)는 하나의 장치 참조(hid_get_device())를 획득한다. 두 경로가 이를 해제할 수 있다: - 장치 파괴: hid_destroy_device() -> hid_bpf_destroy_device() -> __hid_bpf_ops_destroy_device(), 이는 rcu_read_lock() 아래에서 hdev->bpf.prog_list를 순회하며 첨부된 각 프로그램마다 하나의 참조를 해제한다; - BPF 링크 해제: bpf 맵 삭제(BPF_F_LINK 없음)는 동기적으로 st_ops->unreg() -> hid_bpf_unreg()를 호출하며, 이는 자신의 등록에 대한 참조를 해제한다. 조정 핸드셰이크(e->hdev = NULL 파괴 측 vs unreg 측의 "if (!hdev) return")는 TOCTOU 검사이다: 두 경로는 서로 다른 잠금 도메인(rcu_read_lock vs prog_list_lock)에서 실행되므로 동시 unreg가 ops->hdev를 NULL이 아닌 상태로 읽고 prog_list_lock에서 차단된 후 파괴 순회가 실행되는 동안 진행할 수 있으며, 두 경로가 동일한 참조를 해제한다. 참조 카운트는 합법적으로 0에 도달하며(각 감소는 개별적으로 유효), refcount_t 포화는 발생하지 않는다: 장치는 단순히 해제되며 전송은 여전히 hid_destroy_device() 내부에 있고 이후 해제된 메모리를 참조한다. 수정은 양쪽에서 prog_list_lock 아래에서 제거/NULL 결정을 직렬화하고 파괴 측 put 호출을 잠금 밖으로 이동한다. 잠금이 유지되는 동안 ops->hdev의 일반 읽기/쓰기가 충분하며, READ_ONCE/WRITE_ONCE는 추가하지 않아 패치를 최소화한다. 잠금 해제 읽기 안전성: hid_bpf_unreg() 상단에서 ops->hdev의 잠금 해제 읽기는 해제된 장치를 참조하지 않는다. 왜냐하면 unreg 경로 자체가 이 등록 참조를 여전히 보유하고 있고(잠금 해제 후 자신의 hid_put_device()에서 해제), 이미 ops->hdev를 해제한 파괴 순회는 잠금 내부 재확인에서 조기 반환하여 put을 하지 않기 때문이다. 각 등록 참조는 최대 한 경로에서만 해제된다.
CVE-2026-90000
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: HID: rmi: 크기가 작은 RMI 보고서로 인한 범위 밖 접근(OOB) 수정 hid-rmi 드라이버는 장치가 제공하는 보고서 설명자(report descriptor)만을 기준으로 writeReport/readReport 버퍼 크기를 결정하며, 최소 크기 제한이 없다: data->input_report_size = hid_report_len(input_report); data->output_report_size = hid_report_len(output_report); alloc_size = data->output_report_size + data->input_report_size; data->writeReport = devm_kzalloc(&hdev->dev, alloc_size, GFP_KERNEL); data->readReport = data->writeReport + data->output_report_size; 하지만 고정된 오프셋에 대해 읽기 및 쓰기를 수행한다. 1바이트 출력 및 1바이트 입력 보고서를 선언하는 장치는 hid_report_len()이 각각 2를 반환하여 alloc_size가 4가 되지만, rmi_set_page()는 프로브 시점에 무조건 호출되는 rmi_input_configured()를 통해 writeReport[4]에 저장하고, rmi_hid_read_block()는 writeReport[0..5]에 저장한다. readReport는 writeReport + output_report_size 위치에 있으므로, 이러한 저장은 다음 응답을 파싱하는 영역을 손상시킨다. 읽기 경로는 더 심각하다: 복사 길이는 장치가 채우는 readReport[1]에서 가져오며 최대 255까지 가능하고, 복사는 input_report_size를 고려하지 않고 &readReport[2]에서 시작하여 할당 끝을 넘어 인접한 슬랩 객체로 넘어간다. 이는 거짓 장치가 필요하지도 않다 -- rmi_f01_probe()는 고정된 21바이트 레지스터 읽기를 수행하므로, 입력 보고서가 23바이트 미만인 장치는 진실하게 응답해도 범위 밖 읽기가 발생한다. 이 바이트들은 RMI 코어가 동작하는 레지스터 값이 되며, rmi_f01_probe()는 이를 커널 로그에 제품 ID로 출력하고 동일 이름의 모드 0444 sysfs 속성을 통해 내보내며, rmi_driver_set_irq_bits()는 이를 인터럽트 마스크로 장치에 다시 전송한다. 따라서 크기가 작은 보고서 설명자는 권한 없는 사용자 공간과 장치 자체 모두에 힙 내용을 노출한다. 쓰기 경로도 제한이 없다: rmi_hid_write_block()는 &writeReport[4]에 대해 길이 제한 없는 복사를 수행하며, 프로브 시점에 장치가 구동할 수 있는 가장 큰 호출자는 rmi_driver_set_irq_bits()인데, 이 길이는 장치가 페이지 설명 테이블에서 선언한 인터럽트 소스 수에서 파생된다. 마지막으로, 읽기 루프는 길이가 0인 응답에서 종료할 수 없다: 이런 응답은 아무것도 복사하지 않고 bytes_read나 bytes_needed를 증가시키지 않으며, 응답이 도착했기 때문에 1초 대기(wait_event_timeout())도 발생하지 않아, 0을 계속 응답하는 장치는 page_mutex가 잡힌 상태로 프로브 작업자 내에서 루프를 계속 실행한다. khungtaskd는 모든 응답이 태스크를 깨우므로 이를 인지하지 못한다. 프로브 시점에 드라이버가 구성하는 크기보다 작은 보고서는 거부한다 -- 쓰기 보고서에 대해 6바이트 출력, 읽기 핸드셰이크에 대해 3바이트 입력 --, 쓰기 및 읽기 복사 길이를 장치가 선언한 보고서 크기로 제한하며, 길이 0 응답은 오류로 처리한다. 이렇게 거부된 장치는 RMI 보고서 ID를 전혀 포함하지 않는 일반 HID 장치로 시작된다. RMI_DEVICE는 해당 경로에서 device_flags에 설정된 상태로 두어서는 안 된다. 그렇지 않으면 rmi_input_configured()가 RMI 설정을 수행하고 rmi_set_page()에 도달하여 거부로 할당하지 않은 writeReport 버퍼를 쓴다. 이 비트는 설정된 상태로 올 수 있는데, rmi_probe()가 보고서 검사 전에 id->driver_data를 device_flags에 복사하고, new_id sysfs 속성을 통한 바인딩이 driver_data에 RMI_DEVICE(BIT(0))를 설정할 수 있기 때문이다. driver_data가 복사될 때 이 비트를 제거하여 RMI_DEVICE가 "이 프로브가 보고서를 검증했다"는 의미를 정확히 유지하도록 한다; 이 패치 이전의 세 점프도 포함하여 처리한다. 오류 경로는 종료 시 RMI_READ_DATA_PENDING도 해제하는데, 이 플래그는 루프 상단 대기 조건이며, 이를 설정 상태로 두면 이후 모든 wait_event_timeout()이 즉시 반환되어 오래된 응답으로 인해 읽기 경로가 장치 수명 동안 중단된다. 제한(clamping)은 정상 작동하는 하드웨어에 영향을 주지 않는다: 읽기 루프는 이미 처리한다 ---truncated---
CVE-2026-89999
2026년 9월 16일리눅스 커널에서 다음 취약점이 해결되었다: HID: wacom: wacom_intuos_pro2_bt_irq에서 보고서 길이 검증 wacom_intuos_pro2_bt_irq()는 `len`에서 와이어 보고서 길이를 받지만 파싱 전에 이를 참조하지 않는다. 보고서 ID 게이트를 통과한 후 무조건 wacom_intuos_pro2_bt_pen()을 호출하고, features.type에 따라 고정된 하위 파서 체인을 호출하는데, 이들 중 어느 것도 `len`을 받지 않는다: wacom_intuos_pro2_bt_pen(wacom); if (type == INTUOSP2_BT || type == INTUOSP2S_BT) { wacom_intuos_pro2_bt_touch(wacom); wacom_intuos_pro2_bt_pad(wacom); wacom_intuos_pro2_bt_battery(wacom); } else { wacom_intuos_gen3_bt_pad(wacom); wacom_intuos_gen3_bt_battery(wacom); } 각 하위 파서는 고정된 오프셋에서 wacom->data를 역참조한다. 각 분기에서 가장 먼 바이트는 다음과 같다: INTUOSP2_BT / INTUOSP2S_BT: wacom_intuos_pro2_bt_pad()는 data[285] (터치링 바이트)를 읽으므로 보고서는 최소 286 바이트여야 한다; INTUOSHT3_BT ("gen3"): wacom_intuos_gen3_bt_battery()는 data[45]를 읽으므로 보고서는 최소 46 바이트여야 한다. features.type은 VID/PID id_table 항목에서 선택되고 wacom_setup_device_quirks()는 보고서 디스크립터와 무관하게 해당 타입에 대해 펜/패드/터치 입력을 강제로 등록한다. 따라서 악의적이거나 오작동하는 페어링/스푸핑된 블루투스 주변기기가 해당 VID/PID를 광고하고 data[0] == 0x80/0x81 게이트를 만족하는 크기가 부족한 보고서를 보낼 수 있다. 드라이버는 받은 보고서 범위를 넘어 읽고 evdev(MSC_SERIAL / ABS_MISC / ABS_WHEEL, 펜과 패드 입력 노드)를 통해 사용자 공간으로 바이트를 전달하는데, 이는 구체적인 사용자 공간 읽기 채널을 가진 범위 밖 읽기이며, (작은) 보고서 디스크립터 크기 대신 고정 크기 임시 버퍼를 사용하는 전송에서는 진정한 범위 밖 읽기이다. 이것은 이미 형제 함수 wacom_intuos_bt_irq()에서 강화된 동일한 유형의 버그 커밋 2f1763f62909("HID: wacom: wacom_intuos_bt_irq에서 범위 밖 읽기 수정")와 같다. 해당 함수는 각 보고서 ID에 대해 파싱 전에 최소 길이를 검사한다. wacom_intuos_pro2_bt_irq()도 동일하게 보호한다: 파싱 전에 선택된 분기가 실제로 역참조하는 가장 먼 오프셋보다 짧은 보고서는 거부하고 경고하며 종료한다. 펜/터치/패드/배터리 체인이 각 분기마다 무조건 실행되므로 최대 오프셋(INTUOSP2_BT/INTUOSP2S_BT는 286 바이트, gen3 분기는 46 바이트)에 대한 단일 사전 검사가 모든 하위 파서를 제한한다. 짧은 보고서에 대해 0을 반환하면 동일한 잘못된 보고서에 대해 해당 호출도 건너뛰므로 안전하고 보수적인 동작이다.
CVE-2026-89998
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: dm: 테이블 로드 및 언로드 시 경쟁 조건 수정 사용자 공간에서 두 개의 동시 테이블 로드 ioctl을 호출하고 그 중 하나가 성공하고 다른 하나가 실패할 경우, dm_setup_md_queue가 잠금 없이 &md->table_devices를 순회하기 때문에 경쟁 조건이 발생한다. 만약 이 순회가 dm_table_destroy -> free_devices -> dm_put_table_device와 경쟁하면, 잘못된 메모리에 접근하게 된다. 리스트 순회에 대한 잠금을 확장하여 이 경쟁 조건을 수정하였다.
CVE-2026-89997
2026년 9월 16일Linux 커널에서 다음 취약점이 해결되었다: dm: resume-vs-remove 경쟁 조건 수정 사용자가 resume ioctl과 remove ioctl을 동시에 호출하면, __dm_destroy에서 장치가 일시 중지된 후에 다시 시작될 수 있다. 그 결과 postsuspend 메서드를 호출하지 않고 테이블이 파괴된다. Dm 타겟은 postsuspend 메서드가 호출된 후에만 제거될 수 있다고 기대한다. 이 기대가 깨지면 다양한 타겟에서 오작동이 발생할 수 있다. 예를 들어 dm-integrity 타겟에서는 재부팅 알림자가 등록 해제되지 않아 해제 후 사용(use-after-free)이 발생한다. 장치가 파괴 중일 때는 다시 시작(resume)을 거부하도록 이 버그를 수정했다.
CVE-2026-89996
2026년 9월 16일In the Linux kernel, the following vulnerability has been resolved: dma-buf: dma-heap: don't publish fd before copy_to_user() succeeds DMA_HEAP_IOCTL_ALLOC allocates a dma-buf and installs an fd into the caller's fd table via dma_buf_fd() -> fd_install() before dma_heap_ioctl() copies the result back to userspace. If the trailing copy_to_user() fails, userspace never learns the fd number, but the fd (and the underlying dma-buf reference) are already visible to other threads in the same process and are leaked for the lifetime of the process. The obvious "close it on the failure path" fix is unsafe: once fd_install() has run, another thread can already dup() the fd, send it via SCM_RIGHTS, or close() it and let its number be reused, so a subsequent close_fd() from the ioctl path can operate on an unrelated file. This was pointed out by Christian König on v1 [1]. Restructure the allocation path so that fd_install() is the last, unfailable step of a successful ioctl: 1. heap->ops->allocate() creates the dma_buf. 2. get_unused_fd_flags() reserves an fd number in the caller's fd table without publishing it, so no other thread can observe it. 3. copy_to_user() delivers the fd number to userspace; on failure the fd is returned with put_unused_fd() and the dma_buf reference is dropped with dma_buf_put(), leaving no user- visible state behind. 4. dma_buf_fd_install() publishes the fd and emits the trace_dma_buf_fd tracepoint -- from here on the ioctl cannot fail. A new dma_buf_fd_install() helper is introduced in dma-buf.c to wrap fd_install() together with the DMA_BUF_TRACE() call, preserving the export tracing that dma_buf_fd() provides. dma_heap_ioctl_allocate() is refactored to return the struct dma_buf * directly (returning ERR_PTR on failure) so the caller holds the dmabuf reference across steps 3 and 4. The failure at step 3 is easily reachable from userspace: pass a struct dma_heap_allocation_data that lives in a page whose protection is flipped to PROT_READ between copy_from_user() and copy_to_user() (e.g. via mprotect()). Before this change each such ioctl leaks one dmabuf fd; after it, the fd table is unchanged on failure and only /dev/dma_heap/<name> remains open. No UAPI or heap-driver interface change. [1] https://lore.kernel.org/dri-devel/[email protected]/