🔍 CVE-2022-49823

5.5
CVSS Score
MEDIUM
2025-05-01
2026-11-05 20:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 libata-transport 모듈의 ata_tdev_add() 함수에서 transport_add_device()의 반환값을 확인하지 않아, 모듈 제거 시 등록되지 않은 장치를 삭제하려다 NULL 포인터 역참조가 발생합니다. 이로 인해 커널 패닉 또는 서비스 중단이 일어날 수 있습니다. 수정은 반환값을 검사하고 오류 경로에서 장치 해제와 메모리 정리를 수행하는 것입니다.

💡 쉬운 설명

디스크 컨트롤러를 관리하는 리눅스 커널 모듈이 장치 등록 실패를 제대로 확인하지 않습니다. 이후 모듈을 제거할 때 잘못된 메모리를 건드려 시스템이 비정상 종료될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ata: libata-transport: fix error handling in ata_tdev_add() In ata_tdev_add(), the return value of transport_add_device() is not checked. As a result, it causes null-ptr-deref while removing the module, because transport_remove_device() is called to remove the device that was not added. Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d0 CPU: 13 PID: 13603 Comm: rmmod Kdump: loaded Tainted: G W 6.1.0-rc3+ #36 pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : device_del+0x48/0x3a0 lr : device_del+0x44/0x3a0 Call trace: device_del+0x48/0x3a0 attribute_container_class_device_del+0x28/0x40 transport_remove_classdev+0x60/0x7c attribute_container_device_trigger+0x118/0x120 transport_remove_device+0x20/0x30 ata_tdev_delete+0x24/0x50 [libata] ata_tlink_delete+0x40/0xa0 [libata] ata_tport_delete+0x2c/0x60 [libata] ata_port_detach+0x148/0x1b0 [libata] ata_pci_remove_one+0x50/0x80 [libata] ahci_remove_one+0x4c/0x8c [ahci] Fix this by checking and handling return value of transport_add_device() in ata_tdev_add(). In the error path, device_del() is called to delete the device which was added earlier in this function, and ata_tdev_free() is called to free ata_dev.

📍 영향받는 시스템

수정 이전 버전의 Linux 커널 (libata 기반 SATA/AHCI 드라이버를 사용하는 시스템)

⚔️ 공격 벡터

로컬 권한이 있는 사용자가 모듈 적재·제거를 반복하거나 장치 등록 실패를 유도해 서비스 거부(커널 패닉)를 일으킬 수 있습니다.

🛡️ 대응 방법

배포판 제공 최신 커널로 업데이트하거나, 수정 패치(ata_tdev_add 반환값 검사 및 오류 처리 추가)가 포함된 커널로 재빌드하세요.

🔧 검증 코드

출력된 커널 버전이 패치가 적용된 배포판 업데이트 버전 이상인지 배포사 보안 공지와 대조하여 확인하세요.

Shell / Script
uname -r

📊 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