Skip to content
Heist/ feed
Back to feed
UnratedFix available

HID: lg-g15: cancel pending work on remove to fix a use-after-free

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: HID: lg-g15: cancel pending work on remove to fix a use-after-free lg_g15_data is allocated with devm and holds a work item. The report handlers schedule that work straight from device input. lg_g15_event() and lg_g15_v2_event() do it on the backlight cycle key, and lg_g510_leds_event() does it too. The worker dereferences the lg_g15_data back through container_of. The driver had no remove callback and never cancelled the work. So if a report scheduled the work and the keyboard was then unplugged, devres freed lg_g15_data while the work was still pending or running, and the worker touched freed memory. This is a use-after-free. It is reachable as a race on device unplug. Add a remove callback that cancels the work before devres frees the state. g15->work is only initialized for the models that schedule it (G15, G15 v2, G510). The G13 and Z-10 leave it zeroed, so guard the cancel on g15->work.func to avoid cancelling a work that was never set up. The g15 NULL test mirrors the one already in lg_g15_raw_event().

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.261, 5.15.212, 6.1.178, 6.12.96, 6.18.39, 6.6.145, 7.1.4
CVEs
CVE-2026-64362
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:16 UTC · Revision 1

Source evidence

HID: lg-g15: cancel pending work on remove to fix a use-after-free

core-osv · Original source

Published 25 Jul 2026, 08:50 UTC

In the Linux kernel, the following vulnerability has been resolved: HID: lg-g15: cancel pending work on remove to fix a use-after-free lg_g15_data is allocated with devm and holds a work item. The report handlers schedule that work straight from device input. lg_g15_event() and lg_g15_v2_event() do it on the backlight cycle key, and lg_g510_leds_event() does it too. The worker dereferences the lg_g15_data back through container_of. The driver had no remove callback and never cancelled the work. So if a report scheduled the work and the keyboard was then unplugged, devres freed lg_g15_data while the work was still pending or running, and the worker touched freed memory. This is a use-after-free. It is reachable as a race on device unplug. Add a remove callback that cancels the work before devres frees the state. g15->work is only initialized for the models that schedule it (G15, G15 v2, G510). The G13 and Z-10 leave it zeroed, so guard the cancel on g15->work.func to avoid cancelling a work that was never set up. The g15 NULL test mirrors the one already in lg_g15_raw_event().

osv:CVE-2026-64362

Kernel

Fixed versions: 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4

Complete source record
{
  "id": "919839a400aed0af8b5dcc74688668643e61856a094b5469304fe28580b2856e",
  "url": "https://osv.dev/vulnerability/CVE-2026-64362",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "HID: lg-g15: cancel pending work on remove to fix a use-after-free",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: HID: lg-g15: cancel pending work on remove to fix a use-after-free lg_g15_data is allocated with devm and holds a work item. The report handlers schedule that work straight from device input. lg_g15_event() and lg_g15_v2_event() do it on the backlight cycle key, and lg_g510_leds_event() does it too. The worker dereferences the lg_g15_data back through container_of. The driver had no remove callback and never cancelled the work. So if a report scheduled the work and the keyboard was then unplugged, devres freed lg_g15_data while the work was still pending or running, and the worker touched freed memory. This is a use-after-free. It is reachable as a race on device unplug. Add a remove callback that cancels the work before devres frees the state. g15->work is only initialized for the models that schedule it (G15, G15 v2, G510). The G13 and Z-10 leave it zeroed, so guard the cancel on g15->work.func to avoid cancelling a work that was never set up. The g15 NULL test mirrors the one already in lg_g15_raw_event().",
    "evidence": "osv:CVE-2026-64362",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.261",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.212",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.178",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.145",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.96",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.39",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.1.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-64362",
      "aliases": [
        "CVE-2026-64362"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "97b741aba918c4143f4208d2421d08ff215c1b49"
                },
                {
                  "fixed": "3b9a3919aac6977262f04d5365c0456877522a44"
                },
                {
                  "fixed": "4aef9676c26dff8723b56834951cfc6b618f0986"
                },
                {
                  "fixed": "acce9dee807f21184fff19ad17c8ed464247e7f7"
                },
                {
                  "fixed": "33cd1a000daf929356aacf2b191d31714ff0615e"
                },
                {
                  "fixed": "dfc6e61f83113cc18346b6988f07271c0063357d"
                },
                {
                  "fixed": "4d0d51bc12d246accbfbb94de05d729c68c9b8fb"
                },
                {
                  "fixed": "8131f4226688c4be5f30874d167e44dab838eb09"
                },
                {
                  "fixed": "7705b4140d188ce22656f6e541ae7ef834c7e11a"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64362.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.261"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.212"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.178"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.145"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.96"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.39"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.1.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64362.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.051190542Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/33cd1a000daf929356aacf2b191d31714ff0615e",
        "https://git.kernel.org/stable/c/3b9a3919aac6977262f04d5365c0456877522a44",
        "https://git.kernel.org/stable/c/4aef9676c26dff8723b56834951cfc6b618f0986",
        "https://git.kernel.org/stable/c/4d0d51bc12d246accbfbb94de05d729c68c9b8fb",
        "https://git.kernel.org/stable/c/7705b4140d188ce22656f6e541ae7ef834c7e11a",
        "https://git.kernel.org/stable/c/8131f4226688c4be5f30874d167e44dab838eb09",
        "https://git.kernel.org/stable/c/acce9dee807f21184fff19ad17c8ed464247e7f7",
        "https://git.kernel.org/stable/c/dfc6e61f83113cc18346b6988f07271c0063357d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64362.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-64362",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64362.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-64362",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 517292,
  "published_at": "2026-07-25T08:50:18.008+00:00"
}