🇰🇷 한글 설명
Linux 커널의 rpmsg char 드라이버에서 프로브 오류 발생 시 use-after-free 취약점이 발견되었습니다. rpmsg_chrdev_eptdev_add() 함수가 실패할 경우, 이미 할당된 eptdev가 해제되었음에도 불구하고 기본 엔드포인트가 유효하지 않은 포인터를 통해 콜백을 호출할 수 있습니다.
💡 쉬운 설명
시스템이 장치를 준비하는 과정에서 오류가 발생했을 때, 이미 삭제된 메모리 주소를 다시 사용하려고 시도하여 발생하는 문제입니다. 이로 인해 시스템이 충돌하거나 보안 공격에 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rpmsg: char: Fix use-after-free on probe error path
rpmsg_chrdev_probe() stores the newly allocated eptdev in the default
endpoint's priv pointer before calling rpmsg_chrdev_eptdev_add(). If
rpmsg_chrdev_eptdev_add() then fails, its error path frees eptdev while
the default endpoint may still dispatch callbacks with the stale priv
pointer.
Avoid publishing eptdev through the default endpoint until
rpmsg_chrdev_eptdev_add() succeeds. Messages received before the priv
pointer is published should be ignored by rpmsg_ept_cb(). Flow-control
updates can hit rpmsg_ept_flow_cb() in the same window, so make both
callbacks return success when priv is NULL.
📍 영향받는 시스템
Linux kernel (rpmsg char driver component)
⚔️ 공격 벡터
특수하게 조작된 rpmsg 메시지를 전송하여 프로브 오류를 유도하고 해제된 메모리 참조를 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인