🇰🇷 한글 설명
Linux 커널의 nfs/localio 구성 요소에서 nfs_local_read_done 함수 호출 시 res.replen 값을 초기화하지 않아 발생하는 메모리 오염 취약점입니다. NFSv3 LOCALIO 읽기 작업 중 잔여 데이터가 다음 RPC 요청의 헤더 크기에 잘못 복사되어, 잘못된 메모리 위치에 데이터가 수신될 수 있습니다.
💡 쉬운 설명
NFS라는 파일 공유 기능을 사용할 때, 이전 작업의 찌꺼기 데이터가 다음 작업에 섞여 들어가 메모리를 망가뜨리는 문제입니다. 이로 인해 시스템이 오작동하거나 보안상 위험한 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfs/localio: must clear res.replen in nfs_local_read_done
Otherwise memory corruption can occur due to NFSv3 LOCALIO reads
leaving garbage in res.replen:
- nfs3_read_done() copies that into server->read_hdrsize; from there
nfs3_proc_read_setup() copies it to args.replen in new requests.
- nfs3_xdr_enc_read3args() passes that to rpc_prepare_reply_pages()
which includes it in hdrsize for xdr_init_pages, so that rq_rcv_buf
contains a ridiculous len.
- This is copied to rq_private_buf and xs_read_stream_request()
eventually passes the kvec to sock_recvmsg() which receives incoming
data into entirely the wrong place.
This is easily reproduced with NFSv3 LOCALIO that is servicing reads
when it is made to pivot back to using normal RPC. This switch back
to using normal NFSv3 with RPC can occur for a few reasons but this
issue was exposed with a test that stops and then restarts the NFSv3
server while LOCALIO is performing heavy read IO.
📍 영향받는 시스템
NFSv3 LOCALIO를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
NFSv3 LOCALIO에서 일반 RPC 방식으로 전환되는 과정에서 의도적으로 조작된 데이터 흐름을 유도하여 메모리 오염 유발
🛡️ 대응 방법
nfs/localio 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.