In the Linux kernel, the following vulnerability has been resolved:
can: isotp: fix timer drain order, wakeup handling and tx_gen ordering
This patch is a follow-up to commit cf070fe33bfb ("can: isotp: serialize TX state transitions under so->rx_lock") which addresses following sashiko-bot findings:
- isotp_sendmsg(): drain so->txfrtimer first so a stale callback can't
- isotp_release(): wake so->wait after forcing ISOTP_SHUTDOWN so a
- isotp_sendmsg(): have both wait_event_interruptible() calls in
- isotp_sendmsg(): handle potential claim of a new transfer when
- isotp_sendmsg(): handle a stuck can_send() and omit timer and state
- isotp_tx_timeout(): on a claimed timeout, record the ECOMM error for
- isotp_tx_gen_done()/isotp_tx_timeout(): always read tx.state (acquire)
- isotp_sendmsg(): wait_tx_done: drain sk_err via sock_error() once we
Also align the remaining lock-free so->tx.state/rx.state/cfecho accesses and use skb->hash as unique loopback echo frame indicator.