🇰🇷 한글 설명
Linux 커널의 nfsd에서 IPv6 클라이언트 연결 시 sockaddr 구조체의 크기 부족으로 인해 인접한 메모리 영역인 rq_flags 데이터가 유출될 수 있는 취약점입니다. 이 취약점은 권한이 없는 프로세스도 네트워크 네임스페이스를 통해 접근할 수 있어 정보 유출의 위험이 있습니다.
💡 쉬운 설명
네트워크 통신 과정에서 주소 정보를 담는 그릇이 실제 데이터보다 작아서, 옆에 있는 민감한 정보가 함께 새어 나갈 수 있는 문제입니다. 공격자는 이를 통해 시스템 내부의 일부 정보를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: widen nfsd_genl_rqstp address fields to sockaddr_storage
struct nfsd_genl_rqstp declares rq_daddr and rq_saddr as plain
"struct sockaddr" (16 bytes). When an IPv6 NFS client is connected,
nfsd_genl_rpc_status_compose_msg() casts these fields to
"struct sockaddr_in6 *" (28 bytes) and reads sin6_addr at offset 8..24,
which extends 8 bytes past the end of the 16-byte sockaddr field into
the adjacent rq_flags member. The 16-byte nla_put_in6_addr then ships 8
bytes of truncated IPv6 address followed by 8 bytes of rq_flags to
userspace via the NFSD_A_RPC_STATUS_SADDR6/DADDR6 netlink attributes.
This is reachable by any unprivileged process in the network namespace
because NFSD_CMD_RPC_STATUS_GET uses GENL_CMD_CAP_DUMP without
GENL_ADMIN_PERM.
Fix by widening rq_daddr and rq_saddr to struct sockaddr_storage so the
IPv6 casts operate within bounds, copying sizeof(struct sockaddr_storage)
bytes in the memcpy calls so the full address is captured, and
zero-initializing the genl_rqstp stack variable to prevent leaking
uninitialized tail bytes through netlink.
📍 영향받는 시스템
Linux kernel (nfsd component)
⚔️ 공격 벡터
권한이 없는 로컬 프로세스가 Netlink 인터페이스를 통해 RPC 상태 정보를 요청하여 메모리 데이터를 유출
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 sockaddr 구조체를 sockaddr_storage로 확장
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.