🇰🇷 한글 설명
Linux 커널의 batman-adv 모듈에서 병렬로 클레임(claim)을 추가할 때 CRC 데이터가 손상되는 취약점이 발견되었습니다. 여러 CPU가 동시에 클레임 정보를 수정하는 과정에서 CRC 값이 잘못 계산되어 데이터 무결성이 깨질 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 처리될 때 데이터의 오류를 검사하는 '체크섬' 값이 엉뚱하게 계산되는 문제입니다. 이로 인해 네트워크 데이터가 올바른지 확인하는 과정에서 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: bla: avoid CRC corruption due to parallel claim add
batadv_bla_add_claim() is used to add claims and modify the backbone of
claims for CLAIM frames from remote backbones and local packets. When it
handles a claim, it needs to either
* add the new claim's CRC to the backbone CRC
* remove the already existing claim's CRC from the old backbone and add it
to the new backbone
But when the "new" claim code was running in parallel to the "change
backbone" code, it can happen that the CRC was invalid because the
backbone_gw of the claim was changed twice in the "new" claim code path:
* CPU0 creates the claim for gateway A and publishes it in the claim
hash. The crc16 of the address has not yet been added to A's crc at
this point.
* CPU1 processes a claim frame of gateway B for the same client, finds
the just published claim, and performs the ownership change: it
switches the pointer to B, removes the crc16 from A's crc - which
never contained it - and adds it to B's crc.
* CPU0 continues behind the creation branch, unconditionally switches
the pointer back to A without compensating B's crc (its remove_crc
is false for the creation path), and finally adds the crc16 to A's
crc
The CRC is then wrong for both:
* claim belongs to A: but CRC is not part of backbone A's CRC
* claim doesn't belong to B: CRC is still part of backbone B's CRC
This wrong CRC is never recomputated from the stored claims. For local
backbone claims, this can also not recovered using syncs.
To avoid this, split the functionality in clear separate parts:
* new claim which always adds claim CRC to the backbone CRC (but never
changes the already set backbone_gw of the claim back)
* update of existing claim which automatically changes the backbone_gw
entry and only updates both backbone CRCs when there was an actual change
📍 영향받는 시스템
Linux kernel (batman-adv 모듈 사용 환경)
⚔️ 공격 벡터
병렬 처리가 발생하는 네트워크 트래픽 상황을 유도하여 CRC 불일치 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.