Description
In the Linux kernel, the following vulnerability has been resolved: net: 8139cp: keep Rx masked while NAPI is scheduled cp_rx_poll() calls napi_complete_done() and only then takes cp->lock with interrupts disabled to unmask the Rx interrupts. An interrupt that is not masked while polling (TxOK, TxErr, ...) can arrive in between. cp_interrupt() then sees the Rx status bits, which are still set, finds NAPI no longer scheduled, masks Rx and schedules NAPI again. cp_rx_poll() then carries on and unmasks Rx anyway. From that point Rx interrupts are enabled while NAPI is scheduled: cp_interrupt() leaves the Rx bits for the poll routine, does not mask them because napi_schedule_prep() fails, and the level-triggered interrupt fires again as soon as it returns. On an SH7751 LANDISK under combined Tx/Rx load this interrupt storm was captured with a RAM trace right before the board locked up hard. Mask Rx in cp_interrupt() whenever Rx status is pending, not only when NAPI gets scheduled. If the race leaves Rx unmasked, the next interrupt masks it again, and the pending poll unmasks it when it completes.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
ab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < c566302e05f434bc7a551199e4d21b85c4ebdfe9affectedab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < 7282397183ff7eee181eeda434fce5fb637e503caffectedab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < 4f7cde5c0328462940c5b6a8f9b27f1d589bb0b7affectedab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < e6fdd6e2cb7c0f42dd11b5b90947eb006742b6c2affectedab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < 2396429ea7c1f9c0a6c2d2c5adb19f66d025eff9affectedab1e7e1d26669365e49e8312f96f7a5fa0b703a9 to < 547b1ae5ec50b7d81b05b4219e0db7e56279d65faffected
Linux Linux
Default version status: affected
4.11affected0 to < 4.11unaffected5.10.276 to ≤ 5.10.*unaffected5.15.227 to ≤ 5.15.*unaffected6.12.120 to ≤ 6.12.*unaffected6.18.66 to ≤ 6.18.*unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/c566302e05f434bc7a551199e4d21b85c4ebdfe9 ↗
- https://git.kernel.org/stable/c/7282397183ff7eee181eeda434fce5fb637e503c ↗
- https://git.kernel.org/stable/c/4f7cde5c0328462940c5b6a8f9b27f1d589bb0b7 ↗
- https://git.kernel.org/stable/c/e6fdd6e2cb7c0f42dd11b5b90947eb006742b6c2 ↗
- https://git.kernel.org/stable/c/2396429ea7c1f9c0a6c2d2c5adb19f66d025eff9 ↗
- https://git.kernel.org/stable/c/547b1ae5ec50b7d81b05b4219e0db7e56279d65f ↗