{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-142957",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.339Z",
        "datePublished": "2026-12-03T09:16:45.876Z",
        "dateUpdated": "2026-12-04T03:26:33.166Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-04T03:26:33.166Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niio: temperature: hid-sensor-temperature: Use per-instance callbacks\n\nhid-sensor-temperature keeps a single static struct\nhid_sensor_hub_callbacks for all instances and overwrites its pdev in\nevery probe.  With two temperature sensors, input reports for one are\ndelivered with the other's platform device; once that device is\nremoved, platform_get_drvdata() returns NULL and\ntemperature_capture_sample() dereferences it:\n\n  BUG: kernel NULL pointer dereference, address: 00000000000003a8\n  RIP: 0010:temperature_capture_sample+0xd/0x50 [hid_sensor_temperature]\n\nThe oops happens in sensor_hub_raw_event() with the hub's spinlock\nheld, so the hub's removal then hangs.  It reproduces with two uhid\ndevices that each declare a temperature sensor, one destroyed while\nthe other still sends input reports.\n\nKeep the callbacks in struct temperature_state, as the other HID\nsensor drivers (accel, gyro, als, ...) do."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 8.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:A - hid-sensor-hub matches HID_BUS_ANY/HID_GROUP_SENSOR_HUB. hid_temperature_probe() installs one static temperature_callbacks for every instance; the surviving device's Bluetooth HIDP interrupt DATA report (HIDP_TRANS_DATA|HIDP_DATA_RTYPE_INPUT) reaches temperature_capture_sample() via hidp_recv_intr_frame(), hidp_process_report(), hid_input_report(), and sensor_hub_raw_event(). USB attach is only physical.\nAC:L - The attacker connects two Sensor-page HID peripherals (usage 0x200033) so each hid_temperature_probe() overwrites the one static temperature_callbacks.pdev, disconnects the later device, and sends an input report from the survivor. Probe order, link drop, and the report are attacker-controlled; no race or hardware fault is required.\nPR:N - hidp_recv_intr_frame() and sensor_hub_raw_event() check no credentials. A Bluetooth HID/HoGP peer needs no local account or capability; hid-sensor-hub and hid-sensor-temperature autoload from the Sensor-page collection during enumeration.\nUI:N - The attacker brings both peripherals, drops the later connection, and emits the surviving device's input report. Kernel enumeration and sensor_hub_raw_event() run without a local user opening a file or mounting media; dropping the attacker's own link is not a victim action.\nS:U - The dangling platform_device, the NULL deref in temperature_capture_sample(), and any write through a reclaimed driver_data stay in the host kernel HID/IIO path. This is not a guest-to-host, IOMMU, or sandbox boundary crossing.\nC:H - Disconnect runs device_unbind_cleanup(), which clears driver_data, then platform_device_release() kfree()s that platform_object, while the other hub still passes temperature_callbacks.pdev into temperature_capture_sample(). platform_get_drvdata() and iio_priv() then use freed memory; reclaiming the slab gives a kernel read primitive. Before removal the same shared pdev also stores the other sensor's sample into the last instance.\nI:H - On a reclaimed platform_object, platform_get_drvdata() yields an attacker-chosen pointer and temperature_capture_sample() writes the report's attacker-controlled s32 to temp_st->scan.temperature_data; temperature_proc_event() then dereferences that object in iio_push_to_buffers_with_ts(). That is a kernel write and control-flow primitive.\nA:H - If the freed slot still holds the cleared driver_data, iio_priv(NULL) oopses in temperature_capture_sample() at address 0x3a8 while sensor_hub_raw_event() holds pdata->lock, so sensor_hub_remove() blocks forever on that spinlock. The attacker can resend the report. A reclaimed UAF likewise oopses or panics."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/iio/temperature/hid-sensor-temperature.c"
                    ],
                    "versions": [
                        {
                            "version": "59d0f2da35693bfbcf6ffb014213cb8e225c8928",
                            "lessThan": "2ad1c3e70c826892fc3a19b6c9a26489ee1f14cf",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "59d0f2da35693bfbcf6ffb014213cb8e225c8928",
                            "lessThan": "36eeb26031e90eeb81bbac3d3acad61d23fcbdf3",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/iio/temperature/hid-sensor-temperature.c"
                    ],
                    "versions": [
                        {
                            "version": "4.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc4",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.12",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.12",
                                    "versionEndExcluding": "7.4-rc4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/2ad1c3e70c826892fc3a19b6c9a26489ee1f14cf"
                },
                {
                    "url": "https://git.kernel.org/stable/c/36eeb26031e90eeb81bbac3d3acad61d23fcbdf3"
                }
            ],
            "title": "iio: temperature: hid-sensor-temperature: Use per-instance callbacks",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}