In the Linux kernel, the following vulnerability has been resolved:
PCI: endpoint: pci-epf-test: Add NULL check for DMA channels before release
The fields dmachantx and dmachanrx of the struct pciepftest can be NULL even after EPF initialization. Then it is prudent to check that they have non-NULL values before releasing the channels. Add the checks in pciepftestcleandma_chan().
Without the checks, NULL pointer dereferences happen and they can lead to a kernel panic in some cases:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000050 Call trace: dmareleasechannel+0x2c/0x120 (P) pciepftestepcdeinit+0x94/0xc0 [pciepftest] pciepcdeinitnotify+0x74/0xc0 tegrapcieeppexrstirq+0x250/0x5d8 irqthreadfn+0x34/0xb8 irqthread+0x18c/0x2e8 kthread+0x14c/0x210 retfrom_fork+0x10/0x20
[mani: trimmed the stack trace]
[
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "21354816967218049354477074209518279104",
"length": 311.0
},
"id": "CVE-2025-40032-026eeb9c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c5ce6b6ccc22d486cc7239ed908cb0ae5363a7b",
"signature_type": "Function",
"target": {
"function": "pci_epf_test_clean_dma_chan",
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"88338841766157995827596874544722982704",
"263431307928327410974748723613766239403",
"326017850149172471781519232617685933718",
"210676927539530588464029083280952117613",
"23803278029740487989320947573853489140",
"69851593220146005959690359714556192207",
"211931654766101652462147383295876641610",
"90478109281078936140143564163669095503",
"209604917952259312821604324425572908138",
"228443930959379456599711531975653939930",
"111722646095343740760641917759186254234"
],
"threshold": 0.9
},
"id": "CVE-2025-40032-028530bb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c5ce6b6ccc22d486cc7239ed908cb0ae5363a7b",
"signature_type": "Line",
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"88338841766157995827596874544722982704",
"263431307928327410974748723613766239403",
"326017850149172471781519232617685933718",
"210676927539530588464029083280952117613",
"23803278029740487989320947573853489140",
"69851593220146005959690359714556192207",
"211931654766101652462147383295876641610",
"90478109281078936140143564163669095503",
"209604917952259312821604324425572908138",
"228443930959379456599711531975653939930",
"111722646095343740760641917759186254234"
],
"threshold": 0.9
},
"id": "CVE-2025-40032-06997f51",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57f7fb0d1ac28540c0f6405c829bb9c3b89d8dba",
"signature_type": "Line",
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "21354816967218049354477074209518279104",
"length": 311.0
},
"id": "CVE-2025-40032-09e4fd76",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@85afa9ea122dd9d4a2ead104a951d318975dcd25",
"signature_type": "Function",
"target": {
"function": "pci_epf_test_clean_dma_chan",
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"88338841766157995827596874544722982704",
"263431307928327410974748723613766239403",
"326017850149172471781519232617685933718",
"210676927539530588464029083280952117613",
"23803278029740487989320947573853489140",
"69851593220146005959690359714556192207",
"211931654766101652462147383295876641610",
"90478109281078936140143564163669095503",
"209604917952259312821604324425572908138",
"228443930959379456599711531975653939930",
"111722646095343740760641917759186254234"
],
"threshold": 0.9
},
"id": "CVE-2025-40032-53e84d07",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@85afa9ea122dd9d4a2ead104a951d318975dcd25",
"signature_type": "Line",
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"88338841766157995827596874544722982704",
"263431307928327410974748723613766239403",
"326017850149172471781519232617685933718",
"210676927539530588464029083280952117613",
"23803278029740487989320947573853489140",
"69851593220146005959690359714556192207",
"211931654766101652462147383295876641610",
"90478109281078936140143564163669095503",
"209604917952259312821604324425572908138",
"228443930959379456599711531975653939930",
"111722646095343740760641917759186254234"
],
"threshold": 0.9
},
"id": "CVE-2025-40032-5665cf98",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb54ffd60064c4e5139a3eb216e877b1acae1c8b",
"signature_type": "Line",
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "21354816967218049354477074209518279104",
"length": 311.0
},
"id": "CVE-2025-40032-6608a610",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb54ffd60064c4e5139a3eb216e877b1acae1c8b",
"signature_type": "Function",
"target": {
"function": "pci_epf_test_clean_dma_chan",
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "21354816967218049354477074209518279104",
"length": 311.0
},
"id": "CVE-2025-40032-9d0e6425",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6411f840a9b5c47c00ca8e004733de232553870d",
"signature_type": "Function",
"target": {
"function": "pci_epf_test_clean_dma_chan",
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"88338841766157995827596874544722982704",
"263431307928327410974748723613766239403",
"326017850149172471781519232617685933718",
"210676927539530588464029083280952117613",
"23803278029740487989320947573853489140",
"69851593220146005959690359714556192207",
"211931654766101652462147383295876641610",
"90478109281078936140143564163669095503",
"209604917952259312821604324425572908138",
"329523941686747305592492529127657588259",
"176578384990158174509748269150968244117"
],
"threshold": 0.9
},
"id": "CVE-2025-40032-dc6cd04d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6411f840a9b5c47c00ca8e004733de232553870d",
"signature_type": "Line",
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "21354816967218049354477074209518279104",
"length": 311.0
},
"id": "CVE-2025-40032-dd2370ed",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57f7fb0d1ac28540c0f6405c829bb9c3b89d8dba",
"signature_type": "Function",
"target": {
"function": "pci_epf_test_clean_dma_chan",
"file": "drivers/pci/endpoint/functions/pci-epf-test.c"
}
}
]