🇰🇷 한글 설명
Linux 커널의 SMB 클라이언트에서 대규모 버퍼 쓰기 후 데이터 구멍을 뚫는(punching a hole) 작업 시, 더티 데이터(dirty data)가 제대로 플러시되지 않아 발생합니다. 이로 인해 데이터가 삭제되어야 할 영역이 여전히 데이터가 있는 것으로 잘못 보고될 수 있습니다.
💡 쉬운 설명
파일의 특정 부분을 비우려고 할 때, 아직 저장되지 않은 데이터가 남아 있어 비워진 자리에 다시 데이터가 채워지는 현상입니다. 결과적으로 파일의 빈 공간이 있어야 할 자리에 잘못된 데이터가 남게 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smb/client: flush dirty data before punching a hole
Punching a hole after a large buffered write may leave the range
reported as data. Reproduce it with:
xfs_io -f \
-c "pwrite -b 3m -S 0x61 0 3m" \
-c "fpunch 1m 1m" \
-c "seek -h 0" \
-c "seek -d 1m" \
/mnt/test/repro
Punching 1 MiB at offset 1 MiB should produce:
0 1 MiB 2 MiB 3 MiB
| DATA | HOLE | DATA | EOF
Instead, the entire file is reported as data. SEEK_HOLE(0) returns EOF,
and SEEK_DATA(1M) returns 1M.
This happens because a dirty folio spanning the punched range can be
written back after the punch and refill the hole.
Fix this by flushing and waiting for dirty data in the punched range
before invalidating the page cache and issuing FSCTL_SET_ZERO_DATA.
The xfstests generic/539 pass against Samba/ksmbd with this change.
📍 영향받는 시스템
Linux kernel (smb/client module 포함 버전)
⚔️ 공격 벡터
로컬 사용자가 특정 파일 시스템 작업(pwrite 및 fpunch)을 통해 데이터 무결성을 교란할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux