🇰🇷 한글 설명
Linux 커널의 fsnotify 서브시스템에서 많은 파일을 가진 디렉토리의 감시 플래그를 업데이트할 때 과도한 lock 경합이 발생하여 시스템이 응답 불가능(softlockup)하게 될 수 있는 성능 문제입니다.
💡 쉬운 설명
파일 변경 감지 시스템이 너무 많은 파일이 있는 폴더를 처리할 때 시간이 오래 걸려서 컴퓨터가 멈출 수 있습니다. 이 패치는 느린 작업을 나중에 처리하도록 변경합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fsnotify: clear PARENT_WATCHED flags lazily
In some setups directories can have many (usually negative) dentries.
Hence __fsnotify_update_child_dentry_flags() function can take a
significant amount of time. Since the bulk of this function happens
under inode->i_lock this causes a significant contention on the lock
when we remove the watch from the directory as the
__fsnotify_update_child_dentry_flags() call from fsnotify_recalc_mask()
races with __fsnotify_update_child_dentry_flags() calls from
__fsnotify_parent() happening on children. This can lead upto softlockup
reports reported by users.
Fix the problem by calling fsnotify_update_children_dentry_flags() to
set PARENT_WATCHED flags only when parent starts watching children.
When parent stops watching children, clear false positive PARENT_WATCHED
flags lazily in __fsnotify_parent() for each accessed child.
📍 영향받는 시스템
Linux kernel (공식 버전 범위 미명시, 해당 코드 경로 포함 모든 버전 영향)
⚔️ 공격 벡터
특정 조건(많은 음수 dentries를 가진 디렉토리 감시)에서 시스템 리소스 고갈로 인한 서비스 거부(DoS)
🛡️ 대응 방법
최신 Linux kernel 업데이트 적용 또는 fsnotify 관련 패치 백포트
🔧 검증 코드
현재 커널 버전을 확인하고, softlockup 또는 watchdog 경고가 최근에 발생했는지 확인합니다. 경고가 없으면 안전한 상태입니다.
uname -r && dmesg | grep -i 'softlockup\|watchdog' | tail -5