CVE: CVE-2024-56629
Published: 2024-12-27
Description: In the Linux kernel, the following vulnerability has been resolved:

HID: wacom: fix when get product name maybe null pointer

Due to incorrect dev->product reporting by certain devices, null
pointer dereferences occur when dev->product is empty, leading to
potential system crashes.

This issue was found on EXCELSIOR DL37-D05 device with
Loongson-LS3A6000-7A2000-DL37 motherboard.

Kernel logs:
[   56.470885] usb 4-3: new full-speed USB device number 4 using ohci-pci
[   56.671638] usb 4-3: string descriptor 0 read error: -22
[   56.671644] usb 4-3: New USB device found, idVendor=056a, idProduct=0374, bcdDevice= 1.07
[   56.671647] usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   56.678839] hid-generic 0003:056A:0374.0004: hiddev0,hidraw3: USB HID v1.10 Device [HID 056a:0374] on usb-0000:00:05.0-3/input0
[   56.697719] CPU 2 Unable to handle kernel paging request at virtual address [PII_REDACTED], era ==[PII_REDACTED]6e35c8, ra == ffff800004f98a80
[   56.697732] Oops[#1]:
[   56.697734] CPU: 2 PID: 2742 Comm: (udev-worker) Tainted: G           OE      6.6.0-loong64-desktop #25.00.2000.015
[   56.697737] Hardware name: Inspur CE520L2/C09901N000000000, BIOS 2.09.00 10/11/2024
[   56.697739] pc[PII_REDACTED]6e35c8 ra ffff800004f98a80 tp [PII_REDACTED] sp[PII_REDACTED]47b8a0
[   56.697741] a0 [PII_REDACTED] a1 ffff800004818b28 a2 [PII_REDACTED] a3 [PII_REDACTED]
[   56.697743] a4[PII_REDACTED]47b8f0 a5 [PII_REDACTED] a6 [PII_REDACTED] a7 [PII_REDACTED]
[   56.697745] t0 ffff800004818b2d t1 [PII_REDACTED] t2 [PII_REDACTED] t3 [PII_REDACTED]
[   56.697747] t4 [PII_REDACTED] t5 [PII_REDACTED] t6 [PII_REDACTED] t7 [PII_REDACTED]
[   56.697748] t8 [PII_REDACTED] u0 [PII_REDACTED] s9 [PII_REDACTED] s0 900000011aa48028
[   56.697750] s1 [PII_REDACTED] s2 [PII_REDACTED] s3 ffff800004818e80 s4 ffff[PII_REDACTED]00
[   56.697751] s5[PII_REDACTED]0b98d0 s6 ffff800004811f88 s7 ffff[PII_REDACTED]40 s8 [PII_REDACTED]
[   56.697753]    ra: ffff800004f98a80 wacom_update_name+0xe0/0x300 [wacom]
[   56.697802]   ERA:[PII_REDACTED]6e35c8 strstr+0x28/0x120
[   56.697806]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[   56.697816]  PRMD: 0000000c (PPLV0 +PIE +PWE)
[   56.697821]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[   56.697827]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[   56.697831] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
[   56.697835]  BADV: [PII_REDACTED]
[   56.697836]  PRID: 0014d000 (Loongson-64bit, Loongson-3A6000)
[   56.697838] Modules linked in: wacom(+) bnep bluetooth rfkill qrtr nls_iso8859_1 nls_cp437 snd_hda_codec_conexant snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore input_leds mousedev led_class joydev deepin_netmonitor(OE) fuse nfnetlink dmi_sysfs ip_tables x_tables overlay amdgpu amdxcp drm_exec gpu_sched drm_buddy radeon drm_suballoc_helper i2c_algo_bit drm_ttm_helper r8169 ttm drm_display_helper spi_loongson_pci xhci_pci cec xhci_pci_renesas spi_loongson_core hid_generic realtek gpio_loongson_64bit
[   56.697887] Process (udev-worker) (pid: 2742, threadinfo=00000000aee0d8b4, task=00000000a9eff1f3)
[   56.697890] Stack : [PII_REDACTED] ffff800004817e00 [PII_REDACTED] 0000251c00000000
[   56.697896]         [PII_REDACTED] 00000011fffffffd [PII_REDACTED] [PII_REDACTED]
[   56.697901]         [PII_REDACTED] 1b67a968695184b9 [PII_REDACTED][PII_REDACTED]0b98d0
[   56.697906]        [PII_REDACTED]0bb8d0 900000011aa48028 [PII_REDACTED] ffff800004f9d74c
[   56.697911]        [PII_REDACTED]0ba000 ffff800004f9ce58 [PII_REDACTED] ffff[PII_REDACTED]40
[   56.697916]         ffff800004811f88[PII_REDACTED]0b98d0[PII_REDACTED]da2aa8[PII_REDACTED]0bb8d0
[   56.697921]         [PII_REDACTED][PII_REDACTED]0ba[PII_REDACTED]11aa48028 ffff800004f9d74c
[   56.697926]         ffff[PII_REDACTED]e8[PII_REDACTED]0bb8b8[PII_REDACTED]0ba000 [PII_REDACTED]
[   56.697931]        [PII_REDACTED]0bb8d0 
---truncated---
CVSS Score: 5.5 (MEDIUM)
CWE: CWE-476, CWE-476
References: https://git.kernel.org/stable/c/2cd323c55bd3f356bf23ae1b4c20100abcdc29d6; https://git.kernel.org/stable/c/2ed3e3a3ac06af8a6391c3d6a7791b7967d7d43a; https://git.kernel.org/stable/c/5912a921289edb34d40aeab32ea6d52d41e75fed