pds_core: fix auxiliary device add/del races
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
fec5f7af1d5f64a38f9224cd27b274d1af55a7ed| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pds_core: fix auxiliary device add/del races
Two paths add or delete the same slot (pf->vfs[vf_id].padev): a VF's pdsc_reset_done() and the PF's devlink enable_vnet/disable_vnet handler. They serialize on config_lock, but neither guards the slot under it correctly.
add() registers and stores a new auxiliary device without first checking the slot, so a second add of an already-populated slot leaks the first device. del() makes that check outside config_lock, so two concurrent dels can both pass it; the first clears the slot, and the second dereferences a NULL pointer.
Check and update the slot under config_lock in both paths.
From the CVE record · Linux
The Linux kernel's pds_core mishandles concurrent auxiliary-device add and delete operations. Two concurrent deletions can cause a NULL pointer dereference, while adding to an occupied slot can leak a device. The input does not specify whether an attacker can trigger these races or what access would be required.
Engineers running Linux kernels with pds_core should check whether their kernel includes the fix; affected versions are not specified.