🇰🇷 한글 설명
Linux 커널의 FUSE 파일 시스템에서 요청을 대기 목록에 다시 추가할 때 FR_SENT 플래그를 초기화하지 않아 발생하는 취약점입니다. 특정 조건에서 잘못된 주소로 데이터를 복사하려 할 때 커널 경고(Warning)가 발생하며 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
파일 시스템을 관리하는 프로그램이 작업을 다시 시도하는 과정에서 상태 표시를 제대로 지우지 않아 오류가 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 예기치 않게 경고를 내보내거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fuse: clear FR_SENT when re-adding requests into pending list
The following warning was reported by lee bruce:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8264 at fs/fuse/dev.c:300
fuse_request_end+0x685/0x7e0 fs/fuse/dev.c:300
Modules linked in:
CPU: 0 PID: 8264 Comm: ab2 Not tainted 6.9.0-rc7
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
RIP: 0010:fuse_request_end+0x685/0x7e0 fs/fuse/dev.c:300
......
Call Trace:
<TASK>
fuse_dev_do_read.constprop.0+0xd36/0x1dd0 fs/fuse/dev.c:1334
fuse_dev_read+0x166/0x200 fs/fuse/dev.c:1367
call_read_iter include/linux/fs.h:2104 [inline]
new_sync_read fs/read_write.c:395 [inline]
vfs_read+0x85b/0xba0 fs/read_write.c:476
ksys_read+0x12f/0x260 fs/read_write.c:619
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xce/0x260 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
......
</TASK>
The warning is due to the FUSE_NOTIFY_RESEND notify sent by the write()
syscall in the reproducer program and it happens as follows:
(1) calls fuse_dev_read() to read the INIT request
The read succeeds. During the read, bit FR_SENT will be set on the
request.
(2) calls fuse_dev_write() to send an USE_NOTIFY_RESEND notify
The resend notify will resend all processing requests, so the INIT
request is moved from processing list to pending list again.
(3) calls fuse_dev_read() with an invalid output address
fuse_dev_read() will try to copy the same INIT request to the output
address, but it will fail due to the invalid address, so the INIT
request is ended and triggers the warning in fuse_request_end().
Fix it by clearing FR_SENT when re-adding requests into pending list.
📍 영향받는 시스템
Linux kernel (특히 6.9.0-rc7 및 관련 FUSE 모듈 사용 버전)
⚔️ 공격 벡터
FUSE 장치에 대해 특정 순서(read -> write(USE_NOTIFY_RESEND) -> read with invalid address)로 시스템 호출을 수행하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 FR_SENT 플래그 초기화 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.