ice: fix potential NULL pointer deref in error path of ice_set_ringparam()
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.577.0.107.1In the Linux kernel, the following vulnerability has been resolved:
ice: fix potential NULL pointer deref in error path of ice_set_ringparam()
ice_set_ringparam nullifies tstamp_ring of temporary tx_rings, without clearing ICE_TX_RING_FLAGS_TXTIME bit. When ICE_TX_RING_FLAGS_TXTIME is set and the subsequent ice_setup_tx_ring() call fails, a NULL pointer dereference could happen in the unwinding sequence:
ice_clean_tx_ring() -> ice_is_txtime_cfg() == true (ICE_TX_RING_FLAGS_TXTIME is set) -> ice_free_tx_tstamp_ring() -> ice_free_tstamp_ring() -> tstamp_ring->desc (NULL deref)
Clear ICE_TX_RING_FLAGS_TXTIME bit to avoid the potential issue.
Note that this potential issue is found by manual code review. Compile test only since unfortunately I don't have E830 devices.
From the CVE record · Linux
The Linux kernel’s ice driver can dereference a NULL pointer while cleaning up a transmit ring. This can happen if ice_setup_tx_ring() fails after a temporary ring’s timestamp pointer is cleared but its TXTIME flag remains set. The input does not establish whether an attacker can trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with the ice driver should check their kernel versions; affected versions are not specified.