net: mana: Use pci_name() for debugfs directory naming
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.337.0.107.1In the Linux kernel, the following vulnerability has been resolved:
net: mana: Use pci_name() for debugfs directory naming
Use pci_name(pdev) for the per-device debugfs directory instead of hardcoded "0" for PFs and pci_slot_name(pdev->slot) for VFs. The previous approach had two issues:
1. pci_slot_name() dereferences pdev->slot, which can be NULL for VFs in environments like generic VFIO passthrough or nested KVM, causing a NULL pointer dereference.
2. Multiple PFs would all use "0", and VFs across different PCI domains or buses could share the same slot name, leading to -EEXIST errors from debugfs_create_dir().
pci_name(pdev) returns the unique BDF address, is always valid, and is unique across the system.
From the CVE record · Linux
The Linux kernel's mana driver can dereference a NULL PCI slot pointer when naming a VF's debugfs directory in environments such as generic VFIO passthrough or nested KVM. The previous naming scheme can also cause debugfs directory creation errors when device names collide. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel with the mana driver should check their systems; affected versions are not specified.