🇰🇷 한글 설명
Linux 커널 scsi bfa 드라이버에서 장치 초기화 실패 시 메모리를 해제하고도 포인터를 NULL로 설정하지 않아, 드라이버 제거 시 같은 메모리를 중복으로 해제하는 double-free 취약점입니다.
💡 쉬운 설명
Linux 시스템에서 특정 드라이버가 시작 실패 후 종료될 때 같은 메모리를 두 번 지우려고 하는 오류입니다. 이는 시스템 충돌이나 특정 권한으로 코드 실행을 가능하게 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: bfa: Double-free fix
When the bfad_im_probe() function fails during initialization, the memory
pointed to by bfad->im is freed without setting bfad->im to NULL.
Subsequently, during driver uninstallation, when the state machine enters
the bfad_sm_stopping state and calls the bfad_im_probe_undo() function,
it attempts to free the memory pointed to by bfad->im again, thereby
triggering a double-free vulnerability.
Set bfad->im to NULL if probing fails.
📍 영향받는 시스템
Linux kernel (bfa 드라이버를 사용하는 Brocade 파이버채널 어댑터 탑재 시스템)
⚔️ 공격 벡터
로컬: bfad_im_probe() 실패 조건 유도 후 드라이버 언로드 시 double-free 트리거
🛡️ 대응 방법
kernel 패치 적용 (bfad->im을 NULL로 설정하는 fix 커밋 포함된 최신 커널로 업그레이드)
🔧 검증 코드
bfa 드라이버 로드 여부 확인 및 현재 커널 버전 확인. 패치 적용 여부는 커널 바이너리 분석으로 'bfad->im = NULL' 코드 존재 여부 확인 (미포함 시 취약함)
lsmod | grep -i bfa > /dev/null && uname -r && grep -q 'bfad->im.*NULL' /lib/modules/$(uname -r)/kernel/drivers/scsi/bfa/bfad.o 2>/dev/null && echo 'Patched' || (uname -r && echo 'Check kernel version for CVE-2025-38699')