lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 28 Nov 2023 18:11:12 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <edumazet@...gle.com>
CC: <davem@...emloft.net>, <horms@...nel.org>, <kuba@...nel.org>,
	<kuni1840@...il.com>, <kuniyu@...zon.com>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>
Subject: Re: [PATCH v2 net-next 8/8] tcp: Factorise cookie-dependent fields initialisation in cookie_v[46]_check()

From: Eric Dumazet <edumazet@...gle.com>
Date: Tue, 28 Nov 2023 16:42:38 +0100
> > @@ -337,40 +326,36 @@ struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops,
> >                 return NULL;
> >         }
> >
> > +       ireq = inet_rsk(req);
> > +       treq = tcp_rsk(req);
> > +
> > +       req->mss = mss;
> > +       req->ts_recent = tcp_opt->saw_tstamp ? tcp_opt->rcv_tsval : 0;
> > +
> > +       ireq->snd_wscale = tcp_opt->snd_wscale;
> > +       ireq->tstamp_ok = tcp_opt->saw_tstamp;
> > +       ireq->sack_ok = tcp_opt->sack_ok;
> > +       ireq->wscale_ok = tcp_opt->wscale_ok;
> > +       ireq->ecn_ok = tcp_opt->rcv_tsecr & TS_OPT_ECN;
> 
> I doubt this will do what you/we want, because ireq->ecn is not a
> bool, it is a one bit field
> and TS_OPT_ECN != 1.
> 
> I would have used instead :
> 
>  ireq->ecn_ok = !!(tcp_opt->rcv_tsecr & TS_OPT_ECN);

Ah exactly, it was buggy.  I'll fix it in v3.

Thanks for catching!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ