<div dir="auto"><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Yes, the CC had been initialized by setsockopt, after that, it was intialized again in function tcp_init_transfer() because of setting icsk_ca_initialized to 0.</div><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><font face="sans-serif"><br></font></div><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><font face="sans-serif">Regards,</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 29, 2021, 01:20 Neal Cardwell <<a href="mailto:ncardwell@google.com">ncardwell@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">)<br>
<br>
On Mon, Jun 28, 2021 at 1:15 PM Phi Nguyen <<a href="mailto:phind.uet@gmail.com" target="_blank" rel="noreferrer">phind.uet@gmail.com</a>> wrote:<br>
><br>
> On 6/29/2021 12:24 AM, Neal Cardwell wrote:<br>
><br>
> > Thanks.<br>
> ><br>
> > Can you also please provide a summary of the event sequence that<br>
> > triggers the bug? Based on your Reported-by tag, I guess this is based<br>
> > on the syzbot reproducer:<br>
> ><br>
> >   <a href="https://groups.google.com/g/syzkaller-bugs/c/VbHoSsBz0hk/m/cOxOoTgPCAAJ" rel="noreferrer noreferrer" target="_blank">https://groups.google.com/g/syzkaller-bugs/c/VbHoSsBz0hk/m/cOxOoTgPCAAJ</a><br>
> ><br>
> > but perhaps you can give a summary of the event sequence that causes<br>
> > the bug? Is it that the call:<br>
> ><br>
> > setsockopt$inet_tcp_TCP_CONGESTION(r0, 0x6, 0xd,<br>
> > &(0x7f0000000000)='cdg\x00', 0x4)<br>
> ><br>
> > initializes the CC and happens before the connection is established,<br>
> > and then when the connection is established, the line that sets:<br>
> >    icsk->icsk_ca_initialized = 0;<br>
> > is incorrect, causing the CC to be initialized again without first<br>
> > calling the cleanup code that deallocates the CDG-allocated memory?<br>
> ><br>
> > thanks,<br>
> > neal<br>
> ><br>
><br>
> Hi Neal,<br>
><br>
> The gdb stack trace that lead to init_transfer_input() is as bellow, the<br>
> current sock state is TCP_SYN_RECV.<br>
<br>
Thanks. That makes sense as a snapshot of time for<br>
tcp_init_transfer(), but I think what would be more useful would be a<br>
description of the sequence of events, including when the CC was<br>
initialized previous to that point (as noted above, was it that the<br>
setsockopt(TCP_CONGESTION) completed before that point?).<br>
<br>
thanks,<br>
neal<br>
</blockquote></div>