🔍 CVE-2022-50151

7.8
CVSS Score
HIGH
2025-06-18
2026-08-15 13:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 cdns3 USB 드라이버 로드 시 잘못된 메모리 할당 플래그(GFP_DMA32)를 사용하여 경고 메시지가 발생하는 취약점입니다. 이 플래그는 dma_alloc_coherent() 함수에서 적절히 처리되지 않아 커널의 메모리 할당 로직에 혼선을 줄 수 있습니다.

💡 쉬운 설명

컴퓨터의 USB 장치를 작동시키는 소프트웨어에서 메모리를 빌려올 때 잘못된 요청 방식을 사용하여 경고가 발생하는 문제입니다. 실제 시스템이 멈추는 치명적인 오류는 아니지만, 시스템 운영의 안정성을 저해할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: usb: cdns3: fix random warning message when driver load Warning log: [ 4.141392] Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0xa20 (GFP_ATOMIC). Fix your code! [ 4.150340] CPU: 1 PID: 175 Comm: 1-0050 Not tainted 5.15.5-00039-g2fd9ae1b568c #20 [ 4.158010] Hardware name: Freescale i.MX8QXP MEK (DT) [ 4.163155] Call trace: [ 4.165600] dump_backtrace+0x0/0x1b0 [ 4.169286] show_stack+0x18/0x68 [ 4.172611] dump_stack_lvl+0x68/0x84 [ 4.176286] dump_stack+0x18/0x34 [ 4.179613] kmalloc_fix_flags+0x60/0x88 [ 4.183550] new_slab+0x334/0x370 [ 4.186878] ___slab_alloc.part.108+0x4d4/0x748 [ 4.191419] __slab_alloc.isra.109+0x30/0x78 [ 4.195702] kmem_cache_alloc+0x40c/0x420 [ 4.199725] dma_pool_alloc+0xac/0x1f8 [ 4.203486] cdns3_allocate_trb_pool+0xb4/0xd0 pool_alloc_page(struct dma_pool *pool, gfp_t mem_flags) { ... page = kmalloc(sizeof(*page), mem_flags); page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation, &page->dma, mem_flags); ... } kmalloc was called with mem_flags, which is passed down in cdns3_allocate_trb_pool() and have GFP_DMA32 flags. kmall_fix_flags() report warning. GFP_DMA32 is not useful at all. dma_alloc_coherent() will handle DMA memory region correctly by pool->dev. GFP_DMA32 can be removed safely.

📍 영향받는 시스템

Linux kernel (cdns3 driver 사용 환경, 특히 i.MX8QXP 하드웨어 관련 시스템)

⚔️ 공격 벡터

로컬 시스템에서 드라이버 로드 시 발생하는 경고를 통한 정보 노출 또는 시스템 로그 오염

🛡️ 대응 방법

Linux 커널을 최신 패치 버전으로 업데이트하여 cdns3 드라이버의 메모리 할당 플래그 수정 사항을 적용해야 합니다.

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 버전(5.15.5 이상 또는 배포판별 패치 적용 버전)인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel