🇰🇷 한글 설명
Linux 커널의 lan78xx 드라이버에서 인터럽트 버퍼 할당 시 메모리가 두 번 해제되는 double free 취약점이 발견되었습니다. lan78xx_probe() 함수 내에서 usb_free_urb()와 kfree()가 중복 호출되어 발생하며, 이를 수정하기 위해 메모리 할당 순서를 재조정하고 중복된 해제 코드를 제거했습니다.
💡 쉬운 설명
컴퓨터 메모리를 관리하는 과정에서 이미 사용이 끝난 메모리 공간을 실수로 두 번 지우려고 시도하는 오류가 있었습니다. 이 오류가 발생하면 시스템이 갑자기 멈추거나 보안 공격에 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: usb: lan78xx: Fix double free issue with interrupt buffer allocation
In lan78xx_probe(), the buffer `buf` was being freed twice: once
implicitly through `usb_free_urb(dev->urb_intr)` with the
`URB_FREE_BUFFER` flag and again explicitly by `kfree(buf)`. This caused
a double free issue.
To resolve this, reordered `kmalloc()` and `usb_alloc_urb()` calls to
simplify the initialization sequence and removed the redundant
`kfree(buf)`. Now, `buf` is allocated after `usb_alloc_urb()`, ensuring
it is correctly managed by `usb_fill_int_urb()` and freed by
`usb_free_urb()` as intended.
📍 영향받는 시스템
lan78xx 드라이버를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
USB LAN 카드를 통한 로컬 또는 물리적 접근을 통한 메모리 오염 공격
🛡️ 대응 방법
lan78xx 드라이버의 수정 사항이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 버전인지 확인