🇰🇷 한글 설명
Linux 커널의 PCI 엔드포인트 테스트 드라이버(pci-epf-test)에서 불필요한 NULL 체크로 인해 발생하던 문제를 해결했습니다. 기존에는 중복된 NULL 체크로 인해 Smatch 정적 분석 도구에서 오탐이 발생했으나, 캐시된 기능을 사용하도록 수정하여 코드 효율성을 높였습니다.
💡 쉬운 설명
컴퓨터 부품을 테스트하는 프로그램 코드에 불필요하게 복잡한 확인 절차가 있어 오류로 오해받던 부분을 깔끔하게 정리한 것입니다. 실제 보안 위협보다는 코드의 정확성과 효율성을 개선한 업데이트입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
PCI: endpoint: pci-epf-test: Make use of cached 'epc_features' in pci_epf_test_core_init()
Instead of getting the epc_features from pci_epc_get_features() API, use
the cached pci_epf_test::epc_features value to avoid the NULL check. Since
the NULL check is already performed in pci_epf_test_bind(), having one more
check in pci_epf_test_core_init() is redundant and it is not possible to
hit the NULL pointer dereference.
Also with commit a01e7214bef9 ("PCI: endpoint: Remove "core_init_notifier"
flag"), 'epc_features' got dereferenced without the NULL check, leading to
the following false positive Smatch warning:
drivers/pci/endpoint/functions/pci-epf-test.c:784 pci_epf_test_core_init() error: we previously assumed 'epc_features' could be null (see line 747)
Thus, remove the redundant NULL check and also use the epc_features::
{msix_capable/msi_capable} flags directly to avoid local variables.
[kwilczynski: commit log]
📍 영향받는 시스템
Linux Kernel (pci-epf-test 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
직접적인 공격 가능성은 매우 낮음 (코드 최적화 및 오탐 수정 사항)
🛡️ 대응 방법
최신 보안 패치가 적용된 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.