Skip to contentSkip to conversation

CVE-2023-52993: x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 27, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

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

x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL

Baoquan reported that after triggering a crash the subsequent crash-kernel fails to boot about half of the time. It triggers a NULL pointer dereference in the periodic tick code.

This happens because the legacy timer interrupt (IRQ0) is resent in software which happens in soft interrupt (tasklet) context. In this context get_irq_regs() returns NULL which leads to the NULL pointer dereference.

The reason for the resend is a spurious APIC interrupt on the IRQ0 vector which is captured and leads to a resend when the legacy timer interrupt is enabled. This is wrong because the legacy PIC interrupts are level triggered and therefore should never be resent in software, but nothing ever sets the IRQ_LEVEL flag on those interrupts, so the core code does not know about their trigger type.

Ensure that IRQ_LEVEL is set when the legacy PCI interrupts are set up.

The Linux kernel CVE team has assigned CVE-2023-52993 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 4.14.305 with commit 744fe9be9665227335539b7a77ece8d9ff62b6c0
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 4.19.272 with commit 496975d1a2937f4baadf3d985991b13fc4fc4f27
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 5.4.231 with commit 8770cd9d7c14aa99c255a0d08186f0be953e1638
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 5.10.166 with commit e284c273dbb4c1ed68d4204bff94d0b10e4a90f5
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 5.15.91 with commit 0b08201158f177aab469e356b4d6af24fdd118df
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 6.1.9 with commit 137f1b47da5f58805da42c1b7811e28c1e353f39
	Issue introduced in 2.6.18 with commit a4633adcdbc15ac51afcd0e1395de58cee27cf92 and fixed in 6.2 with commit 5fa55950729d0762a787451dc52862c3f850f859

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2023-52993

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	arch/x86/kernel/i8259.c
	arch/x86/kernel/irqinit.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/744fe9be9665227335539b7a77ece8d9ff62b6c0
	https://git.kernel.org/stable/c/496975d1a2937f4baadf3d985991b13fc4fc4f27
	https://git.kernel.org/stable/c/8770cd9d7c14aa99c255a0d08186f0be953e1638
	https://git.kernel.org/stable/c/e284c273dbb4c1ed68d4204bff94d0b10e4a90f5
	https://git.kernel.org/stable/c/0b08201158f177aab469e356b4d6af24fdd118df
	https://git.kernel.org/stable/c/137f1b47da5f58805da42c1b7811e28c1e353f39
	https://git.kernel.org/stable/c/5fa55950729d0762a787451dc52862c3f850f859