🇰🇷 한글 설명
리눅스 커널의 CAN BCM(Broadcast Manager)에서 런타임 업데이트 시 잠금 메커니즘이 부족하여 발생하는 취약점입니다. 사용자 공간과 hrtimer 컨텍스트에서 동시에 변수를 수정할 수 있어 KASAN slab-out-of-bounds read(경계 외 읽기) 오류를 유발할 수 있습니다.
💡 쉬운 설명
자동차 통신 시스템을 제어하는 리눅스 커널의 특정 기능에서 데이터가 동시에 수정될 때 충돌이 발생할 수 있는 문제입니다. 이로 인해 시스템이 잘못된 메모리 영역을 읽어 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
can: bcm: add locking for bcm_op runtime updates
The CAN broadcast manager (CAN BCM) can send a sequence of CAN frames via
hrtimer. The content and also the length of the sequence can be changed
resp reduced at runtime where the 'currframe' counter is then set to zero.
Although this appeared to be a safe operation the updates of 'currframe'
can be triggered from user space and hrtimer context in bcm_can_tx().
Anderson Nascimento created a proof of concept that triggered a KASAN
slab-out-of-bounds read access which can be prevented with a spin_lock_bh.
At the rework of bcm_can_tx() the 'count' variable has been moved into
the protected section as this variable can be modified from both contexts
too.
📍 영향받는 시스템
Linux kernel (CAN BCM driver 포함 버전)
⚔️ 공격 벡터
사용자 공간에서 CAN BCM의 런타임 설정을 조작하여 경계 외 메모리 읽기를 유발하는 방식
🛡️ 대응 방법
spin_lock_bh를 사용하여 bcm_can_tx() 함수 내의 변수 접근에 대한 동기화(Locking)를 적용한 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인