🔍 CVE-2026-46041

5.5
CVSS Score
MEDIUM
2026-05-27
2026-06-16 15:14
✅ 완료

🇰🇷 한글 설명

Linux 커널의 greybus: gb-beagleplay 드라이버에서 스핀락(spinlock)을 보유한 상태로 usleep_range()를 호출하여 발생하는 취약점입니다. 이로 인해 'scheduling while atomic' 오류가 발생하며 시스템 커널 패닉이나 불안정성을 초래할 수 있습니다.

💡 쉬운 설명

컴퓨터가 중요한 작업을 처리하기 위해 잠금 장치를 걸어둔 상태에서, 잠시 쉬어야 하는 명령을 내려 시스템이 멈추거나 오류가 발생하는 문제입니다. 이로 인해 운영체제가 갑자기 꺼지거나 오작동할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: greybus: gb-beagleplay: fix sleep in atomic context in hdlc_tx_frames() hdlc_append() calls usleep_range() to wait for circular buffer space, but it is called with tx_producer_lock (a spinlock) held via hdlc_tx_frames() -> hdlc_append_tx_frame()/hdlc_append_tx_u8()/etc. Sleeping while holding a spinlock is illegal and can trigger "BUG: scheduling while atomic". Fix this by moving the buffer-space wait out of hdlc_append() and into hdlc_tx_frames(), before the spinlock is acquired. The new flow: 1. Pre-calculate the worst-case encoded frame length. 2. Wait (with sleep) outside the lock until enough space is available, kicking the TX consumer work to drain the buffer. 3. Acquire the spinlock, re-verify space, and write the entire frame atomically. This ensures that sleeping only happens without any lock held, and that frames are either fully enqueued or not written at all. This bug is found by CodeQL static analysis tool (interprocedural sleep-in-atomic query) and my code review.

📍 영향받는 시스템

Linux kernel (greybus: gb-beagleplay driver components)

⚔️ 공격 벡터

로컬 공격자가 특정 하드웨어 인터페이스를 통해 커널의 동기화 메커니즘을 방해하여 시스템 중단을 유도할 수 있음

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 스핀락 외부에서 대기하도록 수정된 코드를 적용해야 함

🔧 검증 코드

현재 커널 버전과 greybus 드라이버 소스 코드 내 해당 함수 존재 여부를 확인하여 패치 적용 여부를 판단함

Shell / Script
uname -a && grep -r 'hdlc_tx_frames' /lib/modules/$(uname -r)/kernel/drivers/greybus/ 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel