CVE-2024-46755

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
18/09/2024
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()<br /> <br /> mwifiex_get_priv_by_id() returns the priv pointer corresponding to<br /> the bss_num and bss_type, but without checking if the priv is actually<br /> currently in use.<br /> Unused priv pointers do not have a wiphy attached to them which can<br /> lead to NULL pointer dereferences further down the callstack. Fix<br /> this by returning only used priv pointers which have priv-&gt;bss_mode<br /> set to something else than NL80211_IFTYPE_UNSPECIFIED.<br /> <br /> Said NULL pointer dereference happened when an Accesspoint was started<br /> with wpa_supplicant -i mlan0 with this config:<br /> <br /> network={<br /> ssid="somessid"<br /> mode=2<br /> frequency=2412<br /> key_mgmt=WPA-PSK WPA-PSK-SHA256<br /> proto=RSN<br /> group=CCMP<br /> pairwise=CCMP<br /> psk="12345678"<br /> }<br /> <br /> When waiting for the AP to be established, interrupting wpa_supplicant<br /> with and starting it again this happens:<br /> <br /> | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000140<br /> | Mem abort info:<br /> | ESR = 0x0000000096000004<br /> | EC = 0x25: DABT (current EL), IL = 32 bits<br /> | SET = 0, FnV = 0<br /> | EA = 0, S1PTW = 0<br /> | FSC = 0x04: level 0 translation fault<br /> | Data abort info:<br /> | ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000<br /> | CM = 0, WnR = 0, TnD = 0, TagAccess = 0<br /> | GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0<br /> | user pgtable: 4k pages, 48-bit VAs, pgdp=0000000046d96000<br /> | [0000000000000140] pgd=0000000000000000, p4d=0000000000000000<br /> | Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP<br /> | Modules linked in: caam_jr caamhash_desc spidev caamalg_desc crypto_engine authenc libdes mwifiex_sdio<br /> +mwifiex crct10dif_ce cdc_acm onboard_usb_hub fsl_imx8_ddr_perf imx8m_ddrc rtc_ds1307 lm75 rtc_snvs<br /> +imx_sdma caam imx8mm_thermal spi_imx error imx_cpufreq_dt fuse ip_tables x_tables ipv6<br /> | CPU: 0 PID: 8 Comm: kworker/0:1 Not tainted 6.9.0-00007-g937242013fce-dirty #18<br /> | Hardware name: somemachine (DT)<br /> | Workqueue: events sdio_irq_work<br /> | pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)<br /> | pc : mwifiex_get_cfp+0xd8/0x15c [mwifiex]<br /> | lr : mwifiex_get_cfp+0x34/0x15c [mwifiex]<br /> | sp : ffff8000818b3a70<br /> | x29: ffff8000818b3a70 x28: ffff000006bfd8a5 x27: 0000000000000004<br /> | x26: 000000000000002c x25: 0000000000001511 x24: 0000000002e86bc9<br /> | x23: ffff000006bfd996 x22: 0000000000000004 x21: ffff000007bec000<br /> | x20: 000000000000002c x19: 0000000000000000 x18: 0000000000000000<br /> | x17: 000000040044ffff x16: 00500072b5503510 x15: ccc283740681e517<br /> | x14: 0201000101006d15 x13: 0000000002e8ff43 x12: 002c01000000ffb1<br /> | x11: 0100000000000000 x10: 02e8ff43002c0100 x9 : 0000ffb100100157<br /> | x8 : ffff000003d20000 x7 : 00000000000002f1 x6 : 00000000ffffe124<br /> | x5 : 0000000000000001 x4 : 0000000000000003 x3 : 0000000000000000<br /> | x2 : 0000000000000000 x1 : 0001000000011001 x0 : 0000000000000000<br /> | Call trace:<br /> | mwifiex_get_cfp+0xd8/0x15c [mwifiex]<br /> | mwifiex_parse_single_response_buf+0x1d0/0x504 [mwifiex]<br /> | mwifiex_handle_event_ext_scan_report+0x19c/0x2f8 [mwifiex]<br /> | mwifiex_process_sta_event+0x298/0xf0c [mwifiex]<br /> | mwifiex_process_event+0x110/0x238 [mwifiex]<br /> | mwifiex_main_process+0x428/0xa44 [mwifiex]<br /> | mwifiex_sdio_interrupt+0x64/0x12c [mwifiex_sdio]<br /> | process_sdio_pending_irqs+0x64/0x1b8<br /> | sdio_irq_work+0x4c/0x7c<br /> | process_one_work+0x148/0x2a0<br /> | worker_thread+0x2fc/0x40c<br /> | kthread+0x110/0x114<br /> | ret_from_fork+0x10/0x20<br /> | Code: a94153f3 a8c37bfd d50323bf d65f03c0 (f940a000)<br /> | ---[ end trace 0000000000000000 ]---

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.19.322 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.284 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.226 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.167 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.110 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.51 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.10.10 (excluding)