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, 30 Jun 2020 09:01:07 -0700
From:   Xie He <hexie3605@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Madhuparna Bhowmik <madhuparnabhowmik04@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/net/wan/lapbether.c: Fixed kernel panic when used
 with AF_PACKET sockets

From: David Miller <davem@...emloft.net>
Date: Mon, Jun 1, 2020 at 11:32 AM -0700
>
> From: Xie He <hexie3605@...il.com>
> Date: Wed, 27 May 2020 20:21:33 -0700
>
> > When we use "AF_PACKET" sockets to send data directly over LAPB over
> > Ethernet using this driver, the kernel will panic because of
> > insufficient header space allocated in the "sk_buff" struct.
> >
> > The header space needs 18 bytes because:
> >   the lapbether driver will remove a pseudo header of 1 byte;
> >   the lapb module will prepend the LAPB header of 2 or 3 bytes;
> >   the lapbether driver will prepend a length field of 2 bytes and the
> > Ethernet header of 14 bytes.
> >
> > So -1 + 3 + 16 = 18.
> >
> > Signed-off-by: Xie He <hexie3605@...il.com>
>
> This is not the real problem.
>
> The real problem is that this is a stacked, layered, device and the
> lapbether driver does not take the inner device's header length into
> consideration.  It should take this from the child device's netdev
> structure rather than use constants.
>
> Your test case will still fail when lapbether is stacked on top of a
> VLAN device or similar, even with your changes.

Thank you for your email! I'm sorry I didn't see your email previously
because of problems with my mailbox.

Yes, you are right. I'll use better ways to improve this and re-submit
my patch. Thanks for pointing this out.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ