🔍 CVE-2023-53667

5.5
CVSS Score
MEDIUM
2025-10-07
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 cdc_ncm 드라이버에서 dwNtbOutMaxSize 값이 너무 작을 때 발생하는 문제를 수정합니다. 값이 너무 작으면 SKB 할당 크기가 부족해 CDC 데이터가 들어가지 않고 커널 패닉이 발생할 수 있습니다. 이에 따라 값을 최소값 USB_CDC_NCM_NTB_MIN_OUT_SIZE 이상으로 클램프하도록 수정되었습니다.

💡 쉬운 설명

USB 네트워크 장치의 설정값이 지나치게 작을 때 메모리 공간이 부족해져 시스템이 멈출 수 있는 문제입니다. 설정값을 안전한 최소 범위 안에 맞추도록 수정되었습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize Currently in cdc_ncm_check_tx_max(), if dwNtbOutMaxSize is lower than the calculated "min" value, but greater than zero, the logic sets tx_max to dwNtbOutMaxSize. This is then used to allocate a new SKB in cdc_ncm_fill_tx_frame() where all the data is handled. For small values of dwNtbOutMaxSize the memory allocated during alloc_skb(dwNtbOutMaxSize, GFP_ATOMIC) will have the same size, due to how size is aligned at alloc time: size = SKB_DATA_ALIGN(size); size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); Thus we hit the same bug that we tried to squash with commit 2be6d4d16a084 ("net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero") Low values of dwNtbOutMaxSize do not cause an issue presently because at alloc_skb() time more memory (512b) is allocated than required for the SKB headers alone (320b), leaving some space (512b - 320b = 192b) for CDC data (172b). However, if more elements (for example 3 x u64 = [24b]) were added to one of the SKB header structs, say 'struct skb_shared_info', increasing its original size (320b [320b aligned]) to something larger (344b [384b aligned]), then suddenly the CDC data (172b) no longer fits in the spare SKB data area (512b - 384b = 128b). Consequently the SKB bounds checking semantics fails and panics: skbuff: skb_over_panic: text:ffffffff831f755b len:184 put:172 head:ffff88811f1c6c00 data:ffff88811f1c6c00 tail:0xb8 end:0x80 dev:<NULL> ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:113! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 57 Comm: kworker/0:2 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: mld mld_ifc_work RIP: 0010:skb_panic net/core/skbuff.c:113 [inline] RIP: 0010:skb_over_panic+0x14c/0x150 net/core/skbuff.c:118 [snip] Call Trace: <TASK> skb_put+0x151/0x210 net/core/skbuff.c:2047 skb_put_zero include/linux/skbuff.h:2422 [inline] cdc_ncm_ndp16 drivers/net/usb/cdc_ncm.c:1131 [inline] cdc_ncm_fill_tx_frame+0x11ab/0x3da0 drivers/net/usb/cdc_ncm.c:1308 cdc_ncm_tx_fixup+0xa3/0x100 Deal with too low values of dwNtbOutMaxSize, clamp it in the range [USB_CDC_NCM_NTB_MIN_OUT_SIZE, CDC_NCM_NTB_MAX_SIZE_TX]. We ensure enough data space is allocated to handle CDC data by making sure dwNtbOutMaxSize is not smaller than USB_CDC_NCM_NTB_MIN_OUT_SIZE.

📍 영향받는 시스템

수정 이전의 Linux 커널 (cdc_ncm USB 이더넷 드라이버 사용 시, 5.15 계열 등)

⚔️ 공격 벡터

물리적으로 연결된 악성 또는 오작동 USB 네트워크 장치가 dwNtbOutMaxSize 값을 작게 보고하여 커널 패닉(서비스 거부)을 유발할 수 있습니다.

🛡️ 대응 방법

배포판 제공 최신 커널 업데이트를 적용하거나, 수정 커밋이 포함된 커널로 재빌드 후 재부팅하세요.

🔧 검증 코드

커널 버전이 패치가 포함된 배포판 업데이트 버전인지 확인하고, cdc_ncm 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.

Shell / Script
uname -r && (lsmod | grep -w cdc_ncm || echo 'cdc_ncm 모듈 미로드')

📊 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