net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d5e9737efda16535e5b54bd627ef4881d11d31f · < 21ba85d9d508422ca9e6698463ff9357c928c22d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Since commit 7d5e9737efda ("net: rfkill: gpio: get the name and type from device property") rfkill_find_type() gets called with the possibly uninitialized "const char *type_name;" local variable.
On x86 systems when rfkill-gpio binds to a "BCM4752" or "LNV4752" acpi_device, the rfkill->type is set based on the ACPI acpi_device_id:
rfkill->type = (unsigned)id->driver_data;
and there is no "type" property so device_property_read_string() will fail and leave type_name uninitialized, leading to a potential crash.
rfkill_find_type() does accept a NULL pointer, fix the potential crash by initializing type_name to NULL.
Note likely sofar this has not been caught because:
From the CVE record · Linux
The Linux kernel's rfkill GPIO driver may pass an uninitialized pointer to rfkill_find_type(), potentially causing a crash. This can occur on x86 systems when the driver binds to a BCM4752 or LNV4752 ACPI device that lacks a type property. The input does not describe an attacker route, authentication requirements, or user interaction.
Engineers running the Linux kernel on x86 systems with BCM4752 or LNV4752 ACPI devices should check their systems; affected versions are not specified.