CVE-2026-143438: mailbox: pcc: Free the channel before unmapping the shared memory
In the Linux kernel, the following vulnerability has been resolved:
mailbox: pcc: Free the channel before unmapping the shared memory
I am seeing a crash on PCC that is related to a an shared memory being unmapped before the IRQ is disabled, and the IRQ kicks in and hits the unmapped (NULL) address. This is a summary of what I see on my box:
scmiprotocol scmidev.1: Message for 1 type 0 is not expected! Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 handleirqeventpercpu+0x1c4/0x9e0 handleirqevent+0x98/0x218 handlefasteoiirq+0x230/0x750 generichandledomainirq+0xac/0x138 gichandleirq+0x344/0x740 callonirqstack+0x30/0x48
The trapping store is iowrite32(SCMISHMEMFLAGINTRENABLED, &shmem->header.flags), a write of 1 at offset 4 of a NULL base.
But, back to the problem, pccmboxfreechannel() unmaps the shared memory and clears pchan->chan.shmem before freeing the IRQ (aka calling mboxfreechannel()).
The interrupt is still live when the mapping goes away.
Free the channel first, before the memory unmap. mboxfreechannel() calls pccshutdown(), which frees the platform interrupt, and then unmap shared memory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the PCC mailbox teardown path, free the channel before unmapping shared memory so the interrupt is freed before the mapping goes away.
Event History
Frequently Asked Questions
When does this issue occur?
It occurs during PCC channel teardown when shared memory is unmapped and pchan->chan.shmem is cleared before the channel is freed. A platform interrupt can still arrive after the mapping has been removed.
What is the observable impact?
A live IRQ can access the cleared shared-memory pointer and trigger a kernel NULL pointer dereference. The reported fault occurs in iowrite32() while writing SCMI_SHMEM_FLAG_INTR_ENABLED at offset 4 of a NULL base address.
How can I tell whether a system has encountered this problem?
Kernel logs may show an unexpected SCMI message followed by an "Unable to handle kernel NULL pointer dereference" error. The stack trace can include __handle_irq_event_percpu, handle_irq_event, handle_fasteoi_irq, generic_handle_domain_irq, and gic_handle_irq.
What ordering avoids the race?
The channel must be freed before its shared memory is unmapped. mbox_free_channel() invokes pcc_shutdown() to free the platform interrupt, after which the shared memory can be safely unmapped.