🇰🇷 한글 설명
Linux 커널의 JFS 파일 시스템 내 jfs_rename 함수에서 nlink 값이 오버플로되는 취약점이 발견되었습니다. 디렉토리 내에서 하위 디렉토리를 이름 변경할 때 nlink 값이 최대치(-1)에서 0으로 잘못 계산되어 경고가 발생하거나 파일 시스템 상태에 영향을 줄 수 있습니다.
💡 쉬운 설명
파일 시스템이 폴더 내의 파일 개수를 세는 과정에서 숫자가 꼬여서 오류가 발생하는 문제입니다. 이로 인해 폴더 정보가 잘못 기록되거나 시스템 경고가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
jfs: nlink overflow in jfs_rename
If nlink is maximal for a directory (-1) and inside that directory you
perform a rename for some child directory (not moving from the parent),
then the nlink of the first directory is first incremented and later
decremented. Normally this is fine, but when nlink = -1 this causes a
wrap around to 0, and then drop_nlink issues a warning.
After applying the patch syzbot no longer issues any warnings. I also
ran some basic fs tests to look for any regressions.
📍 영향받는 시스템
JFS(Journaled File System)를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 JFS 파일 시스템 내에서 디렉토리 이름 변경 작업을 수행하여 유도
🛡️ 대응 방법
JFS nlink 오버플로 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인