CVE-2023-1118: Use After Free

Published Feb 10, 2023
·
Updated

A flaw in the Linux Kernel found. There are use-after-free vulnerabilities in drivers/media/rc/eneir.c of linux that allow attacker to crash linux kernel without any privilege by detaching rc device.

When the rc device is detaching, function eneremove() will be called. But the synchronizations in eneremove() are bad. The situations that may lead to race conditions are shown below.

Firstly, the rx receiver is disabled with enerxdisable() before rcunregisterdevice() in eneremove(), which means it can be enabled again if a process opens /dev/lirc0 between enerxdisable() and rcunregisterdevice().

(cleanup routine) | (open routine) eneremove() | enerxdisable(dev); | eneopen() | enerxenable(dev); //re-enable!

Secondly, the irqaction descriptor is freed by freeirq() before the rc device is unregistered, which means irqaction descriptor may be accessed again after it is deallocated.

(free routine) | (use routine) eneremove() | enerxenable() freeirq(dev->irq, ...); //FREE | enerxenablehw() | enewritereg(..., dev->irq << 1) //USE |

Thirdly, the timer can call enetxsample() that can write to the io ports, which means the io ports could be accessed again after they are deallocated by releaseregion().

(free routine) | (use routine) eneremove() | enetxsample() releaseregion(dev->hwio, ...); //FREE | enewritereg() | outb(..., dev->hwio + ENEIO) //USE

Fourthly, there is no function to cancel txsimtimer in eneremove(), the timer handler enetxirqsim() could race with eneremove(). As a result, the UAF bugs could happen, the process is shown below.

(free routine) | (use routine) | modtimer(&dev->txsimtimer, ..) eneremove() | (wait a time) kfree(dev) //FREE | enetxirqsim() | dev->hwlock //USE | enetxsample(dev) //USE

------------------------------------------

Reference: https://github.com/torvalds/linux/commit/29b0589a865b6f66d141d79b2dd1373e4e50fe17

Other sources

A flaw use after free in the Linux kernel integrated infrared receiver/transceiver driver was found in the way user detaching rc device. A local user could use this flaw to crash the system or potentially escalate their privileges on the system.

A use-after-free flaw was found in the Linux kernel's integrated infrared receiver/transceiver driver. This issue occurs when a user detaches a rc device. This could allow a local user to crash the system or potentially escalate their privileges on the system.

Linux Kernel is vulnerable to a denial of service, caused by a use-after-free flaw in drivers/media/rc/eneir.c. By sending a specially-crafted request, a local attacker could exploit this vulnerability to cause the kernel to crash.

IBM

Affected Software

11 affected componentsFixes available
redhat/Linux kernel<6.3
6.3
Linux Linux kernel>=2.6.36<4.14.308
Linux Linux kernel>=4.15<4.19.276
Linux Linux kernel>=4.20<5.4.235
Linux Linux kernel>=5.5<5.10.173
Linux Linux kernel>=5.11<5.15.99
Linux Linux kernel>=5.16<6.1.16
Linux Linux kernel>=6.2<6.2.3
IBM Security Verify Governance, Identity Manager software component<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager virtual appliance component<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1

Remediation

Information

To mitigate this issue, prevent module ene_ir from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.

Event History

Feb 10, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeakness
Mar 1, 2023
Data Sourced
via Red Hat·01:46 PM
DescriptionSeverityAffected Software
Mar 2, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Jan 24, 2024
Data Sourced
via Launchpad·12:17 AM
Description
Apr 28, 2025
Data Sourced
via Ubuntu·05:20 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-1118?

CVE-2023-1118 is classified as a high severity vulnerability due to its potential to cause kernel crashes.

2

How do I fix CVE-2023-1118?

To fix CVE-2023-1118, upgrade to the Linux kernel version 6.3 or later.

3

Which versions of the Linux kernel are affected by CVE-2023-1118?

CVE-2023-1118 affects Linux kernel versions prior to 6.3 and various versions between 2.6.36 and 6.2.3.

4

Can CVE-2023-1118 be exploited remotely?

Yes, CVE-2023-1118 can be exploited remotely without any privileges by detaching an RC device.

5

What component in the Linux kernel is vulnerable in CVE-2023-1118?

The vulnerability CVE-2023-1118 is found in the drivers/media/rc/ene_ir.c component of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203