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]
Message-ID: <CAA1TwFCr3XryLzPTa-4V1MidusBbJf9kzL5T5zVD+Fy6iqTM_g@mail.gmail.com>
Date:   Wed, 20 Jul 2022 14:37:58 -0400
From:   Jaehee <jhpark1013@...il.com>
To:     nicolas.dichtel@...nd.com
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
        David Ahern <dsahern@...il.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, shuah@...nel.org,
        linux-kernel@...r.kernel.org, Arun Ajith S <aajith@...sta.com>,
        Roopa Prabhu <roopa@...dia.com>,
        Roopa Prabhu <roopa.prabhu@...il.com>,
        Andy Roulin <aroulin@...dia.com>,
        Stefano Brivio <sbrivio@...hat.com>
Subject: Re: [PATCH net-next] net: ipv6: avoid accepting values greater than 2
 for accept_untracked_na

On Wed, Jul 20, 2022 at 4:26 AM Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
>
>
> Le 20/07/2022 à 08:52, Jaehee Park a écrit :
> > The accept_untracked_na sysctl changed from a boolean to an integer
> > when a new knob '2' was added. This patch provides a safeguard to avoid
> > accepting values that are not defined in the sysctl. When setting a
> > value greater than 2, the user will get an 'invalid argument' warning.
> >
> > Signed-off-by: Jaehee Park <jhpark1013@...il.com>
> > Suggested-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> > Suggested-by: Roopa Prabhu <roopa@...dia.com>
> > ---
> >  net/ipv6/addrconf.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> > index 6ed807b6c647..d3e77ea24f05 100644
> > --- a/net/ipv6/addrconf.c
> > +++ b/net/ipv6/addrconf.c
> > @@ -7042,9 +7042,9 @@ static const struct ctl_table addrconf_sysctl[] = {
> >               .data           = &ipv6_devconf.accept_untracked_na,
> >               .maxlen         = sizeof(int),
> >               .mode           = 0644,
> > -             .proc_handler   = proc_dointvec,
> > +             .proc_handler   = proc_dointvec_minmax,
> >               .extra1         = (void *)SYSCTL_ZERO,
> > -             .extra2         = (void *)SYSCTL_ONE,
> > +             .extra2         = (void *)SYSCTL_TWO,
> Nit: the cast is useless:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/sysctl.h#n40
>

O yes thank you for pointing that out! I just sent a v2 for your review.

>
> Regards,
> Nicolas

Thanks,
Jaehee

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ