🔍 CVE-2022-49900

7.8
CVSS Score
HIGH
2025-05-01
2026-11-05 20:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 i2c-piix4 드라이버에서 단일 어댑터 구성일 때 piix4_remove()가 어댑터를 제거하지 못하는 문제가 수정되었습니다. 이로 인해 해제된 메모리를 참조하는 use-after-free 상황이 발생하여 커널 크래시를 유발할 수 있습니다.

💡 쉬운 설명

드라이버를 제거할 때 일부 장치 연결 정보가 정리되지 않고 남아 있어, 다른 장치 드라이버가 이미 해제된 메모리를 읽으면서 시스템이 멈출 수 있습니다. 수정된 커널로 업데이트하면 이 문제가 해결됩니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: i2c: piix4: Fix adapter not be removed in piix4_remove() In piix4_probe(), the piix4 adapter will be registered in: piix4_probe() piix4_add_adapters_sb800() / piix4_add_adapter() i2c_add_adapter() Based on the probed device type, piix4_add_adapters_sb800() or single piix4_add_adapter() will be called. For the former case, piix4_adapter_count is set as the number of adapters, while for antoher case it is not set and kept default *zero*. When piix4 is removed, piix4_remove() removes the adapters added in piix4_probe(), basing on the piix4_adapter_count value. Because the count is zero for the single adapter case, the adapter won't be removed and makes the sources allocated for adapter leaked, such as the i2c client and device. These sources can still be accessed by i2c or bus and cause problems. An easily reproduced case is that if a new adapter is registered, i2c will get the leaked adapter and try to call smbus_algorithm, which was already freed: Triggered by: rmmod i2c_piix4 && modprobe max31730 BUG: unable to handle page fault for address: ffffffffc053d860 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 3752 Comm: modprobe Tainted: G Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:i2c_default_probe (drivers/i2c/i2c-core-base.c:2259) i2c_core RSP: 0018:ffff888107477710 EFLAGS: 00000246 ... <TASK> i2c_detect (drivers/i2c/i2c-core-base.c:2302) i2c_core __process_new_driver (drivers/i2c/i2c-core-base.c:1336) i2c_core bus_for_each_dev (drivers/base/bus.c:301) i2c_for_each_dev (drivers/i2c/i2c-core-base.c:1823) i2c_core i2c_register_driver (drivers/i2c/i2c-core-base.c:1861) i2c_core do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... </TASK> ---[ end trace 0000000000000000 ]--- Fix this problem by correctly set piix4_adapter_count as 1 for the single adapter so it can be normally removed.

📍 영향받는 시스템

패치 이전의 Linux 커널을 사용하는 i2c_piix4 드라이버 탑재 x86 시스템 (Intel/AMD 칩셋 기반 PIIX4/SB800 계열)

⚔️ 공격 벡터

로컬 권한이 있는 사용자가 i2c_piix4 모듈을 제거한 뒤 다른 i2c 장치 드라이버를 로드하면 커널 크래시가 발생할 수 있습니다 (서비스 거부).

🛡️ 대응 방법

배포판에서 제공하는 해당 CVE 수정이 포함된 최신 Linux 커널 패키지로 업데이트 후 재부팅하세요.

🔧 검증 코드

출력된 커널 버전을 배포판의 보안 공지에서 해당 CVE 수정 버전과 비교하고, i2c_piix4 모듈이 로드되어 있다면 해당 커널이 패치되지 않았을 가능성이 있습니다.

Shell / Script
uname -r && (lsmod | grep -i i2c_piix4 || echo 'i2c_piix4 not loaded') && (dpkg -l linux-image-$(uname -r) 2>/dev/null || rpm -q kernel 2>/dev/null)

📊 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