{"id":"CVE-2025-68232","aliases":["CVE-2025-68232"],"related":[],"kind":"vulnerability","state":"published","title":"veth: more robust handing of race to avoid txq getting stuck","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nveth: more robust handing of race to avoid txq getting stuck\n\nCommit dc82a33297fc (\"veth: apply qdisc backpressure on full ptr_ring to\nreduce TX drops\") introduced a race condition that can lead to a permanently\nstalled TXQ. This was observed in production on ARM64 systems (Ampere Altra\nMax).\n\nThe race occurs in veth_xmit(). The producer observes a full ptr_ring and\nstops the queue (netif_tx_stop_queue()). The subsequent conditional logic,\nintended to re-wake the queue if the consumer had just emptied it (if\n(__ptr_ring_empty(...)) netif_tx_wake_queue()), can fail. This leads to a\n\"lost wakeup\" where the TXQ remains stopped (QUEUE_STATE_DRV_XOFF) and\ntraffic halts.\n\nThis failure is caused by an incorrect use of the __ptr_ring_empty() API\nfrom the producer side. As noted in kernel comments, this check is not\nguaranteed to be correct if a consumer is operating on another CPU. The\nempty test is based on ptr_ring->consumer_head, making it reliable only for\nthe consumer. Using this check from the producer side is fundamentally racy.\n\nThis patch fixes the race by adopting the more robust logic from an earlier\nversion V4 of the patchset, which always flushed the peer:\n\n(1) In veth_xmit(), the racy conditional wake-up logic and its memory barrier\nare removed. Instead, after stopping the queue, we unconditionally call\n__veth_xdp_flush(rq). This guarantees that the NAPI consumer is scheduled,\nmaking it solely responsible for re-waking the TXQ.\n  This handles the race where veth_poll() consumes all packets and completes\nNAPI *before* veth_xmit() on the producer side has called netif_tx_stop_queue.\nThe __veth_xdp_flush(rq) will observe rx_notify_masked is false and schedule\nNAPI.\n\n(2) On the consumer side, the logic for waking the peer TXQ is moved out of\nveth_xdp_rcv() and placed at the end of the veth_poll() function. This\nplacement is part of fixing the race, as the netif_tx_queue_stopped() check\nmust occur after rx_notify_masked is potentially set to false during NAPI\ncompletion.\n  This handles the race where veth_poll() consumes all packets, but haven't\nfinished (rx_notify_masked is still true). The producer veth_xmit() stops the\nTXQ and __veth_xdp_flush(rq) will observe rx_notify_masked is true, meaning\nnot starting NAPI.  Then veth_poll() change rx_notify_masked to false and\nstops NAPI.  Before exiting veth_poll() will observe TXQ is stopped and wake\nit up.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nveth: more robust handing of race to avoid txq getting stuck\n\nCommit dc82a33297fc (\"veth: apply qdisc backpressure on full ptr_ring to\nreduce TX drops\") introduced a race condition that can lead to a permanently\nstalled TXQ. This was observed in production on ARM64 systems (Ampere Altra\nMax).\n\nThe race occurs in veth_xmit(). The producer observes a full ptr_ring and\nstops the queue (netif_tx_stop_queue()). The subsequent conditional logic,\nintended to re-wake the queue if the consumer had just emptied it (if\n(__ptr_ring_empty(...)) netif_tx_wake_queue()), can fail. This leads to a\n\"lost wakeup\" where the TXQ remains stopped (QUEUE_STATE_DRV_XOFF) and\ntraffic halts.\n\nThis failure is caused by an incorrect use of the __ptr_ring_empty() API\nfrom the producer side. As noted in kernel comments, this check is not\nguaranteed to be correct if a consumer is operating on another CPU. The\nempty test is based on ptr_ring->consumer_head, making it reliable only for\nthe consumer. Using this check from the producer side is fundamentally racy.\n\nThis patch fixes the race by adopting the more robust logic from an earlier\nversion V4 of the patchset, which always flushed the peer:\n\n(1) In veth_xmit(), the racy conditional wake-up logic and its memory barrier\nare removed. Instead, after stopping the queue, we unconditionally call\n__veth_xdp_flush(rq). This guarantees that the NAPI consumer is scheduled,\nmaking it solely responsible for re-waking the TXQ.\n  This handles the race where veth_poll() consumes all packets and completes\nNAPI *before* veth_xmit() on the producer side has called netif_tx_stop_queue.\nThe __veth_xdp_flush(rq) will observe rx_notify_masked is false and schedule\nNAPI.\n\n(2) On the consumer side, the logic for waking the peer TXQ is moved out of\nveth_xdp_rcv() and placed at the end of the veth_poll() function. This\nplacement is part of fixing the race, as the netif_tx_queue_stopped() check\nmust occur after rx_notify_masked is potentially set to false during NAPI\ncompletion.\n  This handles the race where veth_poll() consumes all packets, but haven't\nfinished (rx_notify_masked is still true). The producer veth_xmit() stops the\nTXQ and __veth_xdp_flush(rq) will observe rx_notify_masked is true, meaning\nnot starting NAPI.  Then veth_poll() change rx_notify_masked to false and\nstops NAPI.  Before exiting veth_poll() will observe TXQ is stopped and wake\nit up.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad:\n\nveth: manejo más robusto de la condición de carrera para evitar que la txq se atasque\n\nEl commit dc82a33297fc ('veth: apply qdisc backpressure on full ptr_ring to reduce TX drops') introdujo una condición de carrera que puede llevar a una TXQ permanentemente estancada. Esto se observó en producción en sistemas ARM64 (Ampere Altra Max).\n\nLa condición de carrera ocurre en veth_xmit(). El productor observa un ptr_ring lleno y detiene la cola (netif_tx_stop_queue()). La lógica condicional subsiguiente, destinada a reactivar la cola si el consumidor la acababa de vaciar (if (__ptr_ring_empty(...)) netif_tx_wake_queue()), puede fallar. Esto lleva a un 'despertar perdido' (lost wakeup) donde la TXQ permanece detenida (QUEUE_STATE_DRV_XOFF) y el tráfico se detiene.\n\nEste fallo es causado por un uso incorrecto de la API __ptr_ring_empty() desde el lado del productor. Como se señala en los comentarios del kernel, no se garantiza que esta comprobación sea correcta si un consumidor está operando en otra CPU. La prueba de vacío se basa en ptr_ring -> consumer_head, lo que la hace fiable solo para el consumidor. Usar esta comprobación desde el lado del productor es fundamentalmente propenso a condiciones de carrera.\n\nEste parche corrige la condición de carrera adoptando la lógica más robusta de una versión anterior V4 del conjunto de parches, que siempre vaciaba el par:\n\n(1) En veth_xmit(), se eliminan la lógica de activación condicional propensa a condiciones de carrera y su barrera de memoria. En su lugar, después de detener la cola, llamamos incondicionalmente a __veth_xdp_flush(rq). Esto garantiza que el consumidor NAPI sea programado, haciéndolo el único responsable de reactivar la TXQ.\nEsto maneja la condición de carrera donde veth_poll() consume todos los paquetes y completa NAPI antes de que veth_xmit() en el lado del productor haya llamado a netif_tx_stop_queue. La llamada a __veth_xdp_flush(rq) observará que rx_notify_masked es falso y programará NAPI.\n\n(2) En el lado del consumidor, la lógica para activar la TXQ par se mueve de veth_xdp_rcv() y se coloca al final de la función veth_poll(). Esta ubicación es parte de la corrección de la condición de carrera, ya que la comprobación netif_tx_queue_stopped() debe ocurrir después de que rx_notify_masked se establezca potencialmente en falso durante la finalización de NAPI.\nEsto maneja la condición de carrera donde veth_poll() consume todos los paquetes, pero no ha terminado (rx_notify_masked sigue siendo verdadero). El productor veth_xmit() detiene la TXQ y __veth_xdp_flush(rq) observará que rx_notify_masked es verdadero, lo que significa no iniciar NAPI. Luego veth_poll() cambia rx_notify_masked a falso y detiene NAPI. Antes de salir, veth_poll() observará que la TXQ está detenida y la activará.","source":"nvd"}],"published":"2025-12-16T14:04:12.624Z","modified":"2026-10-14T13:10:00.187Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"9fe31b3f314534e238aa6d0b6fb492134cbcf8be","fixed":"dd419a3f2ebc18cc00bc32c57fd052d7a188b78b","status":"affected"},{"type":"git","introduced":"dc82a33297fc2c58cb0b2b008d728668d45c0f6a","fixed":"6c8a8b9257a660e622689e23c8fbad4ba2b561b9","status":"affected"},{"type":"git","introduced":"dc82a33297fc2c58cb0b2b008d728668d45c0f6a","fixed":"5442a9da69789741bfda39f34ee7f69552bf0c56","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.17.10","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/dd419a3f2ebc18cc00bc32c57fd052d7a188b78b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6c8a8b9257a660e622689e23c8fbad4ba2b561b9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5442a9da69789741bfda39f34ee7f69552bf0c56","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68232","url":"https://www.cve.org/CVERecord?id=CVE-2025-68232","licence":"CVE Terms of Use","modified":"2026-08-05T12:10:19.353Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68232","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68232","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:09.505Z","epss":{"score":0.0043,"percentile":0.39107,"date":"2026-12-01T12:00:22.000Z"}}