🔍 CVE-2025-38557

5.5
CVSS Score
MEDIUM
2025-08-19
2026-11-05 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 HID Apple 드라이버에서 APPLE_MAGIC_BACKLIGHT 쿼크를 가진 악성 HID 장치가 전원 피처 리포트에 필드가 하나만 선언된 디스크립터를 제공하면, field[1]이 NULL인 상태로 역참조되어 NULL 포인터 역참조가 발생합니다. 수정은 백라이트 및 전원 리포트의 필드 수를 검증하고 요구 개수에 못 미치면 처리를 중단하는 것입니다.

💡 쉬운 설명

악성 USB 또는 블루투스 HID 장치가 잘못된 설명 정보를 보내면 리눅스 커널이 비어 있는 메모리를 읽다가 충돌할 수 있습니다. 이 문제는 장치가 연결된 상태에서만 발생하며, 패치는 필요한 데이터가 없으면 작업을 중단하도록 바꿉니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: HID: apple: validate feature-report field count to prevent NULL pointer dereference A malicious HID device with quirk APPLE_MAGIC_BACKLIGHT can trigger a NULL pointer dereference whilst the power feature-report is toggled and sent to the device in apple_magic_backlight_report_set(). The power feature-report is expected to have two data fields, but if the descriptor declares one field then accessing field[1] and dereferencing it in apple_magic_backlight_report_set() becomes invalid since field[1] will be NULL. An example of a minimal descriptor which can cause the crash is something like the following where the report with ID 3 (power report) only references a single 1-byte field. When hid core parses the descriptor it will encounter the final feature tag, allocate a hid_report (all members of field[] will be zeroed out), create field structure and populate it, increasing the maxfield to 1. The subsequent field[1] access and dereference causes the crash. Usage Page (Vendor Defined 0xFF00) Usage (0x0F) Collection (Application) Report ID (1) Usage (0x01) Logical Minimum (0) Logical Maximum (255) Report Size (8) Report Count (1) Feature (Data,Var,Abs) Usage (0x02) Logical Maximum (32767) Report Size (16) Report Count (1) Feature (Data,Var,Abs) Report ID (3) Usage (0x03) Logical Minimum (0) Logical Maximum (1) Report Size (8) Report Count (1) Feature (Data,Var,Abs) End Collection Here we see the KASAN splat when the kernel dereferences the NULL pointer and crashes: [ 15.164723] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] SMP KASAN NOPTI [ 15.165691] KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] [ 15.165691] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.15.0 #31 PREEMPT(voluntary) [ 15.165691] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 15.165691] RIP: 0010:apple_magic_backlight_report_set+0xbf/0x210 [ 15.165691] Call Trace: [ 15.165691] <TASK> [ 15.165691] apple_probe+0x571/0xa20 [ 15.165691] hid_device_probe+0x2e2/0x6f0 [ 15.165691] really_probe+0x1ca/0x5c0 [ 15.165691] __driver_probe_device+0x24f/0x310 [ 15.165691] driver_probe_device+0x4a/0xd0 [ 15.165691] __device_attach_driver+0x169/0x220 [ 15.165691] bus_for_each_drv+0x118/0x1b0 [ 15.165691] __device_attach+0x1d5/0x380 [ 15.165691] device_initial_probe+0x12/0x20 [ 15.165691] bus_probe_device+0x13d/0x180 [ 15.165691] device_add+0xd87/0x1510 [...] To fix this issue we should validate the number of fields that the backlight and power reports have and if they do not have the required number of fields then bail.

📍 영향받는 시스템

Linux 커널의 HID Apple 드라이버(hid-apple) 및 해당 패치 이전 버전을 사용하는 Linux 배포판

⚔️ 공격 벡터

APPLE_MAGIC_BACKLIGHT 쿼크가 적용되는 조작된 HID 장치를 물리적으로 연결하여 커널 NULL 포인터 역참조를 유발

🛡️ 대응 방법

배포판에서 제공하는 커널 보안 업데이트를 적용하거나 CVE-2025-38557을 수정한 상위 커널 버전으로 업그레이드

🔧 검증 코드

출력된 커널 버전이 패치가 포함된 배포판 업데이트 버전 이상인지 확인하고, hid_apple 모듈이 로드되어 있지 않다면 이 취약점의 영향을 받지 않는 상태입니다.

Shell / Script
uname -r && (lsmod | grep -i hid_apple || echo 'hid_apple not loaded')

📊 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