🇰🇷 한글 설명
Linux 커널 nfsd에서 관리 인터페이스를 통해 파일시스템 잠금 해제를 시도할 때 nfsd 서버가 실행 중이 아니면 서버가 충돌하는 문제입니다. 서버 종료 시 해제된 상태 구조체에 nfsd4_revoke_states()가 접근하는 것이 원인이며, 수정으로 nfsd_mutex를 잡고 서버 실행 여부를 확인한 뒤 호출하도록 변경되었습니다.
💡 쉬운 설명
관리자가 NFS 파일 잠금을 풀려고 할 때 NFS 서비스가 꺼져 있으면 서버가 멈출 수 있는 문제입니다. 패치로 서비스 상태를 먼저 확인하도록 고쳐졌습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: check that server is running in unlock_filesystem
If we are trying to unlock the filesystem via an administrative
interface and nfsd isn't running, it crashes the server. This
happens currently because nfsd4_revoke_states() access state
structures (eg., conf_id_hashtbl) that has been freed as a part
of the server shutdown.
[ 59.465072] Call trace:
[ 59.465308] nfsd4_revoke_states+0x1b4/0x898 [nfsd] (P)
[ 59.465830] write_unlock_fs+0x258/0x440 [nfsd]
[ 59.466278] nfsctl_transaction_write+0xb0/0x120 [nfsd]
[ 59.466780] vfs_write+0x1f0/0x938
[ 59.467088] ksys_write+0xfc/0x1f8
[ 59.467395] __arm64_sys_write+0x74/0xb8
[ 59.467746] invoke_syscall.constprop.0+0xdc/0x1e8
[ 59.468177] do_el0_svc+0x154/0x1d8
[ 59.468489] el0_svc+0x40/0xe0
[ 59.468767] el0t_64_sync_handler+0xa0/0xe8
[ 59.469138] el0t_64_sync+0x1ac/0x1b0
Ensure this can't happen by taking the nfsd_mutex and checking that
the server is still up, and then holding the mutex across the call to
nfsd4_revoke_states().
📍 영향받는 시스템
패치 이전의 Linux 커널 nfsd(NFS 서버) 기능을 사용하는 시스템 (정확한 영향 버전은 해당 배포판 보안 공지 확인 필요)
⚔️ 공격 벡터
관리자 권한이 필요한 nfsctl 관리 인터페이스에서 서버가 실행되지 않은 상태로 파일시스템 잠금 해제를 요청하면 커널 오류가 발생하여 서비스 중단이 일어날 수 있음
🛡️ 대응 방법
배포판에서 제공하는 최신 Linux 커널 보안 업데이트를 적용한 후 재부팅하고, 해당 패치가 포함된 커널 버전인지 확인
🔧 검증 코드
출력된 커널 버전이 배포판 보안 공지에서 해당 CVE 수정이 포함된 버전 이상인지 비교하며, 낮으면 업데이트가 필요합니다.
uname -r && (dpkg -l linux-image-$(uname -r) 2>/dev/null || rpm -q kernel 2>/dev/null) | head -5