CVE-2026-89883 PUBLISHED

media: rc: sunxi-cir: Unregister rc device on probe failure

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

media: rc: sunxi-cir: Unregister rc device on probe failure

After rc_register_device() succeeds, later probe failures must undo the registration with rc_unregister_device(). The current error path jumps to the allocation cleanup label and only calls rc_free_device(), leaving the rc device registration and resources created by rc_register_device() behind.

Add a registered-device unwind label for the IRQ lookup, IRQ request, and hardware initialization failure paths. Keep rc_free_device() for failures before rc_register_device() succeeds.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8

AV:L - The bug is in sunxi_ir_probe() of the Allwinner CIR platform driver; after a failed probe the leftover rc-core/lirc/input device is reached by opening local /dev/lirc or /dev/input/event nodes, not via network packets, Bluetooth, or IR/USB injection. AC:L - After rc_register_device() succeeds, IRQ lookup (including -EPROBE_DEFER), request_irq, or sunxi_ir_hw_init failure calls only rc_free_device(); once the leaked rc/lirc node exists, LIRC_SET_REC_TIMEOUT and similar ioctls deterministically use dangling rc_dev->priv with no attacker-uncontrollable race. PR:L - A low-privileged local user who can open the leaked /dev/lirc* or input event node (typical input-group/udev access on Allwinner STBs, tablets, and SBCs) can ioctl the leftover rc device; bind/unbind is CAP_SYS_ADMIN, but the higher-severity scenario is exploiting an already leaked node. UI:N - The attacker opens the leftover lirc or input device and issues ioctls themselves; no victim must mount a filesystem, plug a device, or otherwise interact. S:U - Use-after-free of the probe-owned sunxi_ir object and leftover rc-core state stays in the host kernel and does not cross a VM, IOMMU, or sandbox boundary. C:H - Failed probe leaves the rc device registered while devres frees the sunxi_ir object that rc_dev->priv still points at, a slab use-after-free; per kernel CVSS guidance that primitive enables arbitrary kernel read. I:H - sunxi_ir_set_timeout() performs CIR MMIO writes through freed ir->base, and leftover s_timeout/ir_raw callbacks can be redirected after heap reuse, yielding arbitrary write and control-flow hijack. A:H - Using the leftover lirc/input node dereferences freed sunxi_ir state or writes unmapped CIR MMIO, causing kernel oops/panic; any use-after-free is high availability impact.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 4655a591478e4b31a3396695a2457daad9d4c899 (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 4efd7146dcf959afe64e9c51531cd8f82e60eab6 (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 826763adbd8bd3137c5b3756650da473dc6216d5 (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 59951b8a87ef4fb4b5b9409f70ba07663681a040 (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 5b58d8c206f37525c8217171e1f3e91dd2fa55e5 (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 5e6f5bffaa80fc8ecce348ec0e34fed9d843e47e (excl.)
  • affected from b4e3e59fb59c214c5bcf9d1bf2971f100e0dac4f to 479aa6fa8c50f1052f1451326ef7d4d586d340c3 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 3.17 is affected
  • unaffected from 0 to 3.17 (excl.)
  • unaffected from 5.15.221 to 5.15.* (incl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References