🔍 CVE-2025-38126

5.5
CVSS Score
MEDIUM
2025-07-03
2026-11-05 21:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 stmmac 이더넷 드라이버에서 플랫폼 디바이스 트리로부터 얻은 PTP 클럭 레이트(clk_ptp_rate)가 0인 경우 타임스탬프 초기화 과정에서 0으로 나누기가 발생하여 커널 패닉이 일어날 수 있는 문제입니다. 이에 대해 0 값을 명시적으로 검사하고 오류를 기록하도록 수정되었습니다.

💡 쉬운 설명

일부 네트워크 장치 드라이버가 시간 기준 값을 잘못 읽으면 0이 되어, 시스템이 계산 중 0으로 나누기를 시도하다 멈출 수 있습니다. 이번 수정은 이 값이 0인지 미리 확인해 시스템이 멈추지 않도록 막습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net: stmmac: make sure that ptp_rate is not 0 before configuring timestamping The stmmac platform drivers that do not open-code the clk_ptp_rate value after having retrieved the default one from the device-tree can end up with 0 in clk_ptp_rate (as clk_get_rate can return 0). It will eventually propagate up to PTP initialization when bringing up the interface, leading to a divide by 0: Division by zero in kernel. CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.30-00001-g48313bd5768a #22 Hardware name: STM32 (Device Tree Support) Call trace: unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x6c/0x8c dump_stack_lvl from Ldiv0_64+0x8/0x18 Ldiv0_64 from stmmac_init_tstamp_counter+0x190/0x1a4 stmmac_init_tstamp_counter from stmmac_hw_setup+0xc1c/0x111c stmmac_hw_setup from __stmmac_open+0x18c/0x434 __stmmac_open from stmmac_open+0x3c/0xbc stmmac_open from __dev_open+0xf4/0x1ac __dev_open from __dev_change_flags+0x1cc/0x224 __dev_change_flags from dev_change_flags+0x24/0x60 dev_change_flags from ip_auto_config+0x2e8/0x11a0 ip_auto_config from do_one_initcall+0x84/0x33c do_one_initcall from kernel_init_freeable+0x1b8/0x214 kernel_init_freeable from kernel_init+0x24/0x140 kernel_init from ret_from_fork+0x14/0x28 Exception stack(0xe0815fb0 to 0xe0815ff8) Prevent this division by 0 by adding an explicit check and error log about the actual issue. While at it, remove the same check from stmmac_ptp_register, which then becomes duplicate

📍 영향받는 시스템

stmmac 이더넷 드라이버를 사용하는 임베디드 리눅스 장치(예: STM32 기반) 및 해당 수정 이전의 Linux 커널

⚔️ 공격 벡터

로컬 또는 설정 조작을 통해 clk_ptp_rate가 0이 되는 조건을 유발해 커널 0 나누기 오류를 일으키는 서비스 거부(DoS) 형태이며, 일반적으로 하드웨어/디바이스 트리 구성에 의존합니다.

🛡️ 대응 방법

커널을 해당 CVE 수정이 포함된 최신 안정 버전으로 업데이트하거나, 배포판 보안 업데이트를 적용하세요.

🔧 검증 코드

출력된 커널 버전을 확인해 CVE 수정이 포함된 패치 버전(배포판 보안 공지 기준)보다 최신인지 비교하고, stmmac 드라이버 사용 여부는 lsmod | grep stmmac 으로 추가 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel