NTB: ntb_transport: Fail TX enqueue when the QP link is down
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f195a1a6fe416882984f8bd6c61afc1383171860 · < 894e136b432da75c0352c80299807a5c4b04f167| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
NTB: ntb_transport: Fail TX enqueue when the QP link is down
Commit f195a1a6fe41 ("ntb: Drop packets when qp link is down") meant to make ntb_transport_tx_enqueue() drop packets submitted while the QP link is down, but it only returns 0 without consuming the packet. Zero means success by this function's contract, so ntb_netdev reports NETDEV_TX_OK and forgets the skb: nothing queued it, nothing frees it, and it leaks, one skb for every transmit racing a link-down.
Return -ENOLINK instead, restoring the contract that a non-zero return leaves the buffer owned by the caller. With the preceding patch, ntb_netdev frees the skb on non-retryable enqueue failures and returns NETDEV_TX_OK, so a packet racing with link-down is dropped without leaking or entering a busy retry loop.
From the CVE record · Linux
The Linux kernel's ntb_transport can leak a network packet buffer when transmission races with a QP link going down. The enqueue function reports success without queuing or freeing the packet, leaking one buffer per affected transmit. The input does not describe an attacker, authentication requirements, or user interaction.
Engineers running Linux kernels with NTB transport should check whether their kernel includes the affected behavior; affected versions are not specified.