mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+9d2a6ef56c3805144bf0@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] KASAN: slab-use-after-free Read in tcp_prune_ofo_queue
Date: Wed, 16 Jul 2025 08:44:58 +0800	[thread overview]
Message-ID: <20250716004459.2148-1-hdanton@sina.com> (raw)
In-Reply-To: <6876cc3c.a00a0220.3af5df.000a.GAE@google.com>

> Date: Tue, 15 Jul 2025 14:46:36 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    55e8757c6962 Merge branch 'net-mctp-improved-bind-handling'
> git tree:       net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=15834382580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=f8235fb7e74dd7f6
> dashboard link: https://syzkaller.appspot.com/bug?extid=9d2a6ef56c3805144bf0
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1445058c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=148e098c580000

#syz test

--- x/net/ipv4/tcp_input.c
+++ y/net/ipv4/tcp_input.c
@@ -5514,14 +5514,16 @@ static bool tcp_prune_ofo_queue(struct s
 		prev = rb_prev(node);
 		rb_erase(node, &tp->out_of_order_queue);
 		goal -= skb->truesize;
-		tcp_drop_reason(sk, skb, SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
 		tp->ooo_last_skb = rb_to_skb(prev);
 		if (!prev || goal <= 0) {
 			if (tcp_can_ingest(sk, skb) &&
-			    !tcp_under_memory_pressure(sk))
+			    !tcp_under_memory_pressure(sk)) {
+				tcp_drop_reason(sk, skb, SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
 				break;
+			}
 			goal = sk->sk_rcvbuf >> 3;
 		}
+		tcp_drop_reason(sk, skb, SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
 		node = prev;
 	} while (node);
 
--

  reply	other threads:[~2025-07-16  0:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 21:46 syzbot
2025-07-16  0:44 ` Hillf Danton [this message]
2025-07-16  1:11   ` syzbot
2025-07-16  0:55 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250716004459.2148-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9d2a6ef56c3805144bf0@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®