🇰🇷 한글 설명
Linux 커널의 Smack 보안 모듈에서 TCP/IPv4 연결 시 레이블링 오류가 발견되었습니다. 연결된 대상의 레이블 대신 요청자의 레이블이 응답 패킷에 잘못 포함되어, 권한이 없는 프로세스가 다른 레이블에 데이터를 쓸 수 있는 보안 취약점이 존재합니다.
💡 쉬운 설명
네트워크 통신을 할 때 신분증(레이블)이 잘못 발급되는 문제입니다. 이로 인해 허가받지 않은 사용자가 마치 권한이 있는 것처럼 속여서 시스템에 데이터를 보낼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smack: tcp: ipv4, fix incorrect labeling
Currently, Smack mirrors the label of incoming tcp/ipv4 connections:
when a label 'foo' connects to a label 'bar' with tcp/ipv4,
'foo' always gets 'foo' in returned ipv4 packets. So,
1) returned packets are incorrectly labeled ('foo' instead of 'bar')
2) 'bar' can write to 'foo' without being authorized to write.
Here is a scenario how to see this:
* Take two machines, let's call them C and S,
with active Smack in the default state
(no settings, no rules, no labeled hosts, only builtin labels)
* At S, add Smack rule 'foo bar w'
(labels 'foo' and 'bar' are instantiated at S at this moment)
* At S, at label 'bar', launch a program
that listens for incoming tcp/ipv4 connections
* From C, at label 'foo', connect to the listener at S.
(label 'foo' is instantiated at C at this moment)
Connection succeedes and works.
* Send some data in both directions.
* Collect network traffic of this connection.
All packets in both directions are labeled with the CIPSO
of the label 'foo'. Hence, label 'bar' writes to 'foo' without
being authorized, and even without ever being known at C.
If anybody cares: exactly the same happens with DCCP.
This behavior 1st manifested in release 2.6.29.4 (see Fixes below)
and it looks unintentional. At least, no explanation was provided.
I changed returned packes label into the 'bar',
to bring it into line with the Smack documentation claims.
📍 영향받는 시스템
Linux kernel (2.6.29.4 이후 버전 중 Smack 모듈이 활성화된 시스템)
⚔️ 공격 벡터
네트워크를 통해 연결된 대상 서버의 레이블을 탈취하거나 잘못된 레이블을 사용하여 권한 없는 쓰기 작업 수행
🛡️ 대응 방법
Smack 레이블링 오류가 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 보안 패치가 적용된 최신 버전인지 확인