* [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp()
@ 2026-11-22 13:55 Lin Ma
2026-11-22 14:03 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Lin Ma @ 2026-11-22 13:55 UTC (permalink / raw)
To: David Howells, Marc Dionne; +Cc: netdev, linux-afs, linux-kernel, Lin Ma
The fast path in rxrpc_resend_tlp() checks that tx_transmitted is before
the end of the tail Tx queue segment, but doesn't check that it is at or
after the segment's base. If it is below the base, the wrong slot can be
selected and rxrpc_retransmit_data() may dereference a NULL txbuf.
This can happen when rxrpc_send_data_packet() fails to allocate its wire
header after rxrpc_transmit_fresh_data() has advanced tx_qtail and tx_top
but before tx_transmitted is updated. A subsequent TLP probe can then
enter rxrpc_resend_tlp() in that state.
Add the missing lower-bound check, matching the slower queue walk. The
reporter triggered this at runtime.
Fixes: 7c482665931b6 ("rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985]")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
---
net/rxrpc/call_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index fec59d9338b9..4fca790a007f 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -141,6 +141,7 @@ void rxrpc_resend_tlp(struct rxrpc_call *call)
/* There's a chance it'll be on the tail segment of the queue. */
req.tq = READ_ONCE(call->tx_qtail);
if (req.tq &&
+ after_eq(call->tx_transmitted, req.tq->qbase) &&
before(call->tx_transmitted, req.tq->qbase + RXRPC_NR_TXQUEUE)) {
rxrpc_retransmit_data(call, &req);
return;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp()
2026-11-22 13:55 [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp() Lin Ma
@ 2026-11-22 14:03 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-22 14:03 UTC (permalink / raw)
To: Lin Ma; +Cc: David Howells, Marc Dionne, netdev, linux-afs, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-22 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 13:55 [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp() Lin Ma
2026-11-22 14:03 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox