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: <CANn89iLkzO0py2N5TZAFWvcMjidd6R1URh0+D6Xr1enVNp8Sew@mail.gmail.com>
Date: Sun, 21 May 2023 19:25:20 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Xin Long <lucien.xin@...il.com>, network dev <netdev@...r.kernel.org>, davem@...emloft.net, 
	kuba@...nel.org, Paolo Abeni <pabeni@...hat.com>, 
	Alexander Duyck <alexanderduyck@...com>
Subject: Re: [PATCH net] rtnetlink: not allow dev gro_max_size to exceed GRO_MAX_SIZE

On Fri, May 19, 2023 at 10:43 PM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> On Fri, 19 May 2023 13:16:08 -0400
> Xin Long <lucien.xin@...il.com> wrote:
>
> > In commit 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536"),
> > it limited GRO_MAX_SIZE to (8 * 65535) to avoid overflows, but also
> > deleted the check of GRO_MAX_SIZE when setting the dev gro_max_size.
> >
> > Currently, dev gro_max_size can be set up to U32_MAX (0xFFFFFFFF),
> > and GRO_MAX_SIZE is not even used anywhere.
> >
> > This patch brings back the GRO_MAX_SIZE check when setting dev
> > gro_max_size/gro_ipv4_max_size by users.
> >
> > Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536")
> > Reported-by: Xiumei Mu <xmu@...hat.com>
> > Signed-off-by: Xin Long <lucien.xin@...il.com>
> > ---
> >  net/core/rtnetlink.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> > index 653901a1bf75..59b24b184cb0 100644
> > --- a/net/core/rtnetlink.c
> > +++ b/net/core/rtnetlink.c
> > @@ -2886,6 +2886,11 @@ static int do_setlink(const struct sk_buff *skb,
> >       if (tb[IFLA_GRO_MAX_SIZE]) {
> >               u32 gro_max_size = nla_get_u32(tb[IFLA_GRO_MAX_SIZE]);
> >
> > +             if (gro_max_size > GRO_MAX_SIZE) {
> > +                     err = -EINVAL;
> > +                     goto errout;
> > +             }
> > +
>
> Please add extack messages so the error can be reported better.

Also, what is the reason for not changing rtnl_create_link() ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ