🔍 CVE-2022-50532

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

🇰🇷 한글 설명

Linux 커널 SCSI mpt3sas 드라이버의 mpt3sas_transport_port_add() 함수에서, sas_rphy_add()가 실패할 때 sas_rphy_free()를 호출하지 않아 리소스 누수가 발생합니다. 이후 device 제거 경로에서 NULL 포인터 역참조로 커널 크래시가 발생할 수 있습니다.

💡 쉬운 설명

서버의 저장장치 드라이버가 오류 상황에서 사용하던 메모리를 제대로 정리하지 못합니다. 이후 장치를 제거할 때 시스템이 비정상 종료(커널 패닉)될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add() In mpt3sas_transport_port_add(), if sas_rphy_add() returns error, sas_rphy_free() needs be called to free the resource allocated in sas_end_device_alloc(). Otherwise a kernel crash will happen: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000108 CPU: 45 PID: 37020 Comm: bash Kdump: loaded Tainted: G W 6.1.0-rc1+ #189 pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : device_del+0x54/0x3d0 lr : device_del+0x37c/0x3d0 Call trace: device_del+0x54/0x3d0 attribute_container_class_device_del+0x28/0x38 transport_remove_classdev+0x6c/0x80 attribute_container_device_trigger+0x108/0x110 transport_remove_device+0x28/0x38 sas_rphy_remove+0x50/0x78 [scsi_transport_sas] sas_port_delete+0x30/0x148 [scsi_transport_sas] do_sas_phy_delete+0x78/0x80 [scsi_transport_sas] device_for_each_child+0x68/0xb0 sas_remove_children+0x30/0x50 [scsi_transport_sas] sas_rphy_remove+0x38/0x78 [scsi_transport_sas] sas_port_delete+0x30/0x148 [scsi_transport_sas] do_sas_phy_delete+0x78/0x80 [scsi_transport_sas] device_for_each_child+0x68/0xb0 sas_remove_children+0x30/0x50 [scsi_transport_sas] sas_remove_host+0x20/0x38 [scsi_transport_sas] scsih_remove+0xd8/0x420 [mpt3sas] Because transport_add_device() is not called when sas_rphy_add() fails, the device is not added. When sas_rphy_remove() is subsequently called to remove the device in the remove() path, a NULL pointer dereference happens.

📍 영향받는 시스템

패치가 적용되지 않은 Linux 커널 (mpt3sas 드라이버 사용 SAS HBA 장착 시스템)

⚔️ 공격 벡터

로컬 사용자가 직접 공격하기 어려우며, 하드웨어 오류 또는 장치 추가 실패 상황에서 발생하는 서비스 거부(DoS) 형태입니다.

🛡️ 대응 방법

커널을 업스트림 수정이 포함된 최신 안정 버전으로 업데이트하고 재부팅합니다.

🔧 검증 코드

출력된 커널 버전이 수정 패치가 포함된 버전인지 배포판 보안 공지와 대조하고, mpt3sas 모듈이 로드되어 있는지 확인합니다.

Shell / Script
uname -r; lsmod | grep -E 'mpt3sas|scsi_transport_sas'

📊 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