🔍 CVE-2023-53123

7.8
CVSS Score
HIGH
2025-05-02
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 s390 PCI 코드에서 개별 PCI 기능(예: SR-IOV VF)을 핫플러그로 제거할 때, PCI 버스의 리소스 목록에 남은 MMIO 리소스 참조가 해제된 뒤에도 유지되어 해당 기능이 다시 나타날 때 use-after-free가 발생합니다. 수정은 개별 기능의 리소스만 버스 리소스 목록에서 제거하고, zpci_bar_struct의 리소스 포인터를 직접 사용하도록 변경하는 것입니다.

💡 쉬운 설명

IBM 메인프레임(s390) 환경에서 가상 장치를 개별적으로 떼었다 다시 붙일 때, 이미 삭제된 메모리 영역을 가리키는 정보가 남아 있는 문제입니다. 이로 인해 시스템이 잘못된 메모리를 사용하여 불안정해지거나 비정상 동작할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: PCI: s390: Fix use-after-free of PCI resources with per-function hotplug On s390 PCI functions may be hotplugged individually even when they belong to a multi-function device. In particular on an SR-IOV device VFs may be removed and later re-added. In commit a50297cf8235 ("s390/pci: separate zbus creation from scanning") it was missed however that struct pci_bus and struct zpci_bus's resource list retained a reference to the PCI functions MMIO resources even though those resources are released and freed on hot-unplug. These stale resources may subsequently be claimed when the PCI function re-appears resulting in use-after-free. One idea of fixing this use-after-free in s390 specific code that was investigated was to simply keep resources around from the moment a PCI function first appeared until the whole virtual PCI bus created for a multi-function device disappears. The problem with this however is that due to the requirement of artificial MMIO addreesses (address cookies) extra logic is then needed to keep the address cookies compatible on re-plug. At the same time the MMIO resources semantically belong to the PCI function so tying their lifecycle to the function seems more logical. Instead a simpler approach is to remove the resources of an individually hot-unplugged PCI function from the PCI bus's resource list while keeping the resources of other PCI functions on the PCI bus untouched. This is done by introducing pci_bus_remove_resource() to remove an individual resource. Similarly the resource also needs to be removed from the struct zpci_bus's resource list. It turns out however, that there is really no need to add the MMIO resources to the struct zpci_bus's resource list at all and instead we can simply use the zpci_bar_struct's resource pointer directly.

📍 영향받는 시스템

s390 아키텍처에서 동작하는 Linux 커널 (수정 커밋 이전 버전, IBM Z 메인프레임 및 SR-IOV/다기능 PCI 장치 사용 환경)

⚔️ 공격 벡터

로컬 권한이 있는 사용자 또는 프로세스가 PCI 기능의 핫플러그 제거 및 재추가를 유발하여 해제된 리소스를 재사용하게 만드는 방식으로 악용될 수 있음

🛡️ 대응 방법

지원되는 최신 Linux 커널로 업데이트하여 해당 커널 패치(PCI: s390 per-function hotplug use-after-free 수정)를 적용

🔧 검증 코드

커널 버전을 확인하고 s390 아키텍처 여부를 판별합니다. s390 시스템이 아니면 이 CVE의 영향을 받지 않으며, s390이면 배포판의 보안 공지에서 해당 커널 버전에 패치가 포함되었는지 확인해야 합니다.

Shell / Script
uname -r && grep -i s390 /proc/cpuinfo 2>/dev/null | head -1

📊 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