🇰🇷 한글 설명
Linux 커널의 netfilter nfnetlink_osf 모듈에서 옵션 매칭 시 경계 외 읽기(out-of-bounds read) 취약점이 발견되었습니다. TCP 옵션 파싱 중 특정 조건에서 포인터가 초기화되지 않아 다음 매칭 시 잘못된 메모리 영역을 참조하게 됩니다. 이로 인해 로그 기록이 실패하거나 잘못된 데이터가 매칭될 수 있습니다.
💡 쉬운 설명
네트워크 검사 도구가 데이터를 읽을 때, 한 번 읽고 나면 다시 처음으로 돌아가야 하는데 돌아가지 않고 끝부분부터 읽으려다 발생하는 오류입니다. 이로 인해 네트워크 보안 로그가 제대로 남지 않거나 잘못된 정보가 기록될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_osf: fix out-of-bounds read on option matching
In nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once
and passed by reference to nf_osf_match_one() for each fingerprint
checked. During TCP option parsing, nf_osf_match_one() advances the
shared ctx->optp pointer.
If a fingerprint perfectly matches, the function returns early without
restoring ctx->optp to its initial state. If the user has configured
NF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.
However, because ctx->optp was not restored, the next call to
nf_osf_match_one() starts parsing from the end of the options buffer.
This causes subsequent matches to read garbage data and fail
immediately, making it impossible to log more than one match or logging
incorrect matches.
Instead of using a shared ctx->optp pointer, pass the context as a
constant pointer and use a local pointer (optp) for TCP option
traversal. This makes nf_osf_match_one() strictly stateless from the
caller's perspective, ensuring every fingerprint check starts at the
correct option offset.
📍 영향받는 시스템
Linux kernel (netfilter/nfnetlink_osf 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 TCP 옵션을 포함한 패킷을 전송하여 커널의 옵션 파싱 로직을 오작동하게 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인