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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL+tcoAWURoNQEq-WckGs6eVQX6VFpHtw4CC9u4Nc7ab0aD+oA@mail.gmail.com>
Date: Tue, 13 Feb 2024 09:48:04 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	dsahern@...nel.org, netdev@...r.kernel.org, 
	Jason Xing <kernelxing@...cent.com>, Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: Re: [PATCH net-next v3 3/6] tcp: add dropreasons in tcp_rcv_state_process()

On Mon, Feb 12, 2024 at 11:33 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Mon, Feb 12, 2024 at 10:29 AM Jason Xing <kerneljasonxing@...il.com> wrote:
> >
> > From: Jason Xing <kernelxing@...cent.com>
>
>
> >                         if (!acceptable)
> > -                               return 1;
> > +                               /* This reason isn't clear. We can refine it in the future */
> > +                               return SKB_DROP_REASON_TCP_CONNREQNOTACCEPTABLE;
>
> tcp_conn_request() might return 0 when a syncookie has been generated.
>
> Technically speaking, the incoming SYN was not dropped :)

Hi Eric, Kuniyuki

Sorry, I should have checked tcp_conn_request() carefully last night.
Today, I checked tcp_conn_request() over and over again.

I didn't find there is any chance to return a negative/positive value,
only 0. It means @acceptable is always true and it should never return
TCP_CONNREQNOTACCEPTABLE for TCP ipv4/6 protocol and never trigger a
reset in this way.

For DCCP, there are chances to return -1 in dccp_v4_conn_request().
But I don't think we've already added drop reasons in DCCP before.

If I understand correctly, there is no need to do any refinement or
even introduce TCP_CONNREQNOTACCEPTABLE new dropreason about the
.conn_request() for TCP.

Should I add a NEW kfree_skb_reason() in tcp_conn_request() for those
labels, like drop_and_release, drop_and_free, drop, and not return a
drop reason to its caller tcp_rcv_state_process()?

Please correct me if I'm wrong...

Thanks,
Jason

>
> I think you need to have a patch to change tcp_conn_request() and its
> friends to return a 'refined' drop_reason
> to avoid future questions / patches.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ