🔍 CVE-2026-31404

7.8
CVSS Score
HIGH
2026-04-03
2026-07-24 22:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 NFSD 모듈에서 RCU 동기화 메커니즘 결함으로 인해 메모리 해제와 접근이 제대로 순서지어지지 않는 취약점입니다. 캐시 정리 중 파일 경로나 클라이언트 정보가 여전히 사용 중인 상태에서 해제되어 NULL 포인터 역참조 및 커널 패닉을 유발합니다.

💡 쉬운 설명

NFS 파일 공유 기능에서 메모리 정리 시 타이밍 문제로 이미 삭제된 메모리에 접근하는 버그입니다. 악의적인 설정 변경과 동시 접근으로 시스템을 멈추게 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: NFSD: Defer sub-object cleanup in export put callbacks svc_export_put() calls path_put() and auth_domain_put() immediately when the last reference drops, before the RCU grace period. RCU readers in e_show() and c_show() access both ex_path (via seq_path/d_path) and ex_client->name (via seq_escape) without holding a reference. If cache_clean removes the entry and drops the last reference concurrently, the sub-objects are freed while still in use, producing a NULL pointer dereference in d_path. Commit 2530766492ec ("nfsd: fix UAF when access ex_uuid or ex_stats") moved kfree of ex_uuid and ex_stats into the call_rcu callback, but left path_put() and auth_domain_put() running before the grace period because both may sleep and call_rcu callbacks execute in softirq context. Replace call_rcu/kfree_rcu with queue_rcu_work(), which defers the callback until after the RCU grace period and executes it in process context where sleeping is permitted. This allows path_put() and auth_domain_put() to be moved into the deferred callback alongside the other resource releases. Apply the same fix to expkey_put(), which has the identical pattern with ek_path and ek_client. A dedicated workqueue scopes the shutdown drain to only NFSD export release work items; flushing the shared system_unbound_wq would stall on unrelated work from other subsystems. nfsd_export_shutdown() uses rcu_barrier() followed by flush_workqueue() to ensure all deferred release callbacks complete before the export caches are destroyed. Reviwed-by: Jeff Layton <[email protected]>

📍 영향받는 시스템

NFSD를 포함하는 Linux 커널 (2024년 이전 버전)

⚔️ 공격 벡터

로컬 공격자가 NFS 내보내기 설정을 변경하면서 동시에 파일 시스템 정보 조회를 수행하여 경합 조건 트리거

🛡️ 대응 방법

Linux 커널을 queue_rcu_work() 패치가 적용된 최신 버전 (2024년 이후)으로 업데이트

🔧 검증 코드

queue_rcu_work가 설정에 포함되어 있으면 패치 적용됨; 미포함이면 취약한 커널 버전

Shell / Script
grep -i 'queue_rcu_work' /boot/config-$(uname -r) 2>/dev/null || echo 'NFSD RCU patch not verified'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel