🔍 CVE-2025-40350

9.8
CVSS Score
CRITICAL
2025-12-16
2026-10-14 13:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 mlx5e 드라이버에서 XDP 프로그램이 xdp_buff의 레이아웃을 변경할 때 발생하는 취약점입니다. XDP 프로그램이 데이터 헤더나 테일을 조정하면 드라이버가 잘못된 skb를 생성하거나 커널 경고 및 오류를 유발할 수 있습니다.

💡 쉬운 설명

네트워크 데이터를 처리하는 과정에서 데이터의 크기나 위치가 갑자기 바뀌면 컴퓨터의 핵심 시스템(커널)이 혼란을 겪어 오류가 발생할 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 예상치 못한 동작을 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: RX, Fix generating skb from non-linear xdp_buff for striding RQ XDP programs can change the layout of an xdp_buff through bpf_xdp_adjust_tail() and bpf_xdp_adjust_head(). Therefore, the driver cannot assume the size of the linear data area nor fragments. Fix the bug in mlx5 by generating skb according to xdp_buff after XDP programs run. Currently, when handling multi-buf XDP, the mlx5 driver assumes the layout of an xdp_buff to be unchanged. That is, the linear data area continues to be empty and fragments remain the same. This may cause the driver to generate erroneous skb or triggering a kernel warning. When an XDP program added linear data through bpf_xdp_adjust_head(), the linear data will be ignored as mlx5e_build_linear_skb() builds an skb without linear data and then pull data from fragments to fill the linear data area. When an XDP program has shrunk the non-linear data through bpf_xdp_adjust_tail(), the delta passed to __pskb_pull_tail() may exceed the actual nonlinear data size and trigger the BUG_ON in it. To fix the issue, first record the original number of fragments. If the number of fragments changes after the XDP program runs, rewind the end fragment pointer by the difference and recalculate the truesize. Then, build the skb with the linear data area matching the xdp_buff. Finally, only pull data in if there is non-linear data and fill the linear part up to 256 bytes.

📍 영향받는 시스템

Linux kernel (mlx5e driver 사용 시스템)

⚔️ 공격 벡터

조작된 XDP 프로그램을 통해 xdp_buff의 레이아웃을 변경하여 커널 오류 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel