🇰🇷 한글 설명
Linux 커널의 crypto: ccp/sev-dev-tsm 구성 요소에서 pdev->bus가 NULL일 경우 발생하는 취약점입니다. segment_id 계산 시에는 NULL 체크를 수행하지만, 이후 코드에서 pdev->bus를 무조건 참조하여 커널 패닉(Crash)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 특정 장치를 연결할 때, 연결 정보가 비어있는 상태를 제대로 확인하지 못해 시스템이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 장치 정보가 없으면 작업을 즉시 중단하도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp/sev-dev-tsm - bail out early when pdev->bus is NULL
dsm_create() initially checks pdev->bus when computing segment_id:
u8 segment_id = pdev->bus ? pci_domain_nr(pdev->bus) : 0;
But the next two lines unconditionally dereference pdev->bus via
pcie_find_root_port() and especially pci_dev_id(pdev), which expands
to PCI_DEVID(dev->bus->number, dev->devfn). If pdev->bus is in fact
NULL, segment_id is initialised to 0 but the very next statement
crashes the kernel.
smatch flags this:
drivers/crypto/ccp/sev-dev-tsm.c:253 dsm_create() error: we
previously assumed 'pdev->bus' could be null (see line 251)
Make the NULL handling consistent: if pdev->bus is NULL the device
has no PCI context to work with and SEV TIO setup cannot proceed,
so return -ENODEV before any of the bus-dependent lookups. The
remaining initialisation now runs only on the path where pdev->bus
is known to be valid.
No change for callers where pdev->bus is non-NULL, which is the
only case where dsm_create() did meaningful work before this change.
📍 영향받는 시스템
pdev->bus가 NULL일 수 있는 환경의 Linux Kernel (ccp/sev-dev-tsm 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 시스템에서 특정 하드웨어 드라이버 초기화 과정을 유도하여 커널 패닉(DoS) 유발
🛡️ 대응 방법
pdev->bus가 NULL인 경우 -ENODEV를 반환하도록 수정된 최신 리눅스 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.