CVE-2024-36971 net: fix __dst_negative_advice() race
net: fix __dst_negative_advice() 함수를 수정합니다.
설명
In the Linux kernel, the following vulnerability has been resolved: net: fix __dst_negative_advice() race __dst_negative_advice() does not enforce proper RCU rules when sk->dst_cache must be cleared, leading to possible UAF. RCU rules are that we must first clear sk->sk_dst_cache, then call dst_release(old_dst). Note that sk_dst_reset(sk) is implementing this protocol correctly, while __dst_negative_advice() uses the wrong order. Given that ip6_negative_advice() has special logic against RTF_CACHE, this means each of the three ->negative_advice() existing methods must perform the sk_dst_reset() themselves. Note the check against NULL dst is centralized in __dst_negative_advice(), there is no need to duplicate it in various callbacks. Many thanks to Clement Lecigne for tracking this issue. This old bug became visible after the blamed commit, using UDP sockets.
Linux 커널에서 다음 취약점이 해결되었습니다. net: fix __dst_negative_advice() 함수를 수정합니다. __dst_negative_advice() 는 sk->dst_cache 를 지워야 할 때 적절한 RCU 규칙을 적용하지 않아 UAF가 가능합니다. RCU 규칙은 먼저 sk->sk_dst_cache를 지우고 dst_release(old_dst)를 호출해야 합니다. sk_dst_reset(sk)가 이 프로토콜을 올바르게 구현하고 있는 반면 __dst_negative_advice()는 잘못된 순서를 사용하고 있습니다. ip6_negative_advice()가 RTF_CACHE에 대해 특별한 로직을 가지고 있다는 것을 감안할 때, 이는 기존의 세 개의 ->negative_advice() 메소드 각각이 sk_dst_reset() 자체를 수행해야 함을 의미합니다. NULL dst에 대한 검사가 중앙 집중화되어 있음을 유의하십시오. __dst_negative_advice(), 다양한 콜백에서 중복할 필요가 없습니다. 이 문제를 추적하기위한 클레멘트 렉시 그네에 많은 감사. 이 오래된 버그는 UDP 소켓을 사용하여 비난받은 커밋 후에 볼 수 있게 되었다.
영향 받는 제품 제품 1개
-
해결 버전 있음
Linux
Linux
영향 받는 버전
- 4.6
해결 버전
- 4.6 미만
- 4.19.316 이상
- 5.4.278 이상
- 5.10.219 이상
- 5.15.161 이상
- 6.1.94 이상
- 6.6.34 이상
- 6.9.4 이상
참고 자료 8건
- git.kernel.org https://git.kernel.org/stable/c/051c0bde9f0450a2ec3d62a86d2a0d2fad117f13 (새 창)
- git.kernel.org https://git.kernel.org/stable/c/2295a7ef5c8c49241bff769e7826ef2582e532a6 (새 창)
- git.kernel.org https://git.kernel.org/stable/c/5af198c387128a9d2ddd620b0f0803564a4d4508 (새 창)
- git.kernel.org https://git.kernel.org/stable/c/81dd3c82a456b0015461754be7cb2693991421b4 (새 창)
- git.kernel.org https://git.kernel.org/stable/c/92f1655aa2b2294d0b49925f3b875a634bd3b59e (새 창)
- git.kernel.org https://git.kernel.org/stable/c/b8af8e6118a6605f0e495a58d591ca94a85a50fc (새 창)
- git.kernel.org https://git.kernel.org/stable/c/db0082825037794c5dba9959c9de13ca34cc5e72 (새 창)
- git.kernel.org https://git.kernel.org/stable/c/eacb8b195579c174a6d3e12a9690b206eb7f28cf (새 창)