🔍 CVE-2021-47483

7.8
CVSS Score
HIGH
2024-05-22
2026-08-04 10:17
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 regmap 구성 요소에서 regcache_rbtree_exit() 함수 호출 시 발생할 수 있는 이중 해제(double-free) 취약점입니다. 메모리 재할당 실패 시 이미 해제된 메모리 주소를 참조하게 되어, 오류 처리 과정에서 동일한 메모리를 다시 해제하려고 시도할 때 발생합니다.

💡 쉬운 설명

컴퓨터가 사용하던 메모리 공간을 정리하는 과정에서, 이미 버린 메모리를 실수로 한 번 더 버리려고 시도하는 오류입니다. 이 과정에서 시스템이 혼란을 겪어 프로그램이 강제로 종료되거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: regmap: Fix possible double-free in regcache_rbtree_exit() In regcache_rbtree_insert_to_block(), when 'present' realloc failed, the 'blk' which is supposed to assign to 'rbnode->block' will be freed, so 'rbnode->block' points a freed memory, in the error handling path of regcache_rbtree_init(), 'rbnode->block' will be freed again in regcache_rbtree_exit(), KASAN will report double-free as follows: BUG: KASAN: double-free or invalid-free in kfree+0xce/0x390 Call Trace: slab_free_freelist_hook+0x10d/0x240 kfree+0xce/0x390 regcache_rbtree_exit+0x15d/0x1a0 regcache_rbtree_init+0x224/0x2c0 regcache_init+0x88d/0x1310 __regmap_init+0x3151/0x4a80 __devm_regmap_init+0x7d/0x100 madera_spi_probe+0x10f/0x333 [madera_spi] spi_probe+0x183/0x210 really_probe+0x285/0xc30 To fix this, moving up the assignment of rbnode->block to immediately after the reallocation has succeeded so that the data structure stays valid even if the second reallocation fails.

📍 영향받는 시스템

Linux Kernel (regmap/regcache 관련 모듈 사용 시스템)

⚔️ 공격 벡터

메모리 재할당 실패를 유도할 수 있는 특정 하드웨어 드라이버(예: madera_spi) 조작 또는 메모리 부족 상황 유도

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인하십시오.

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