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
| ||
|
Date: Tue, 29 Nov 2016 09:06:44 +0800 From: Feng Gao <gfree.wind@...il.com> To: David Miller <davem@...emloft.net> Cc: Mahesh Bandewar <maheshb@...gle.com>, Eric Dumazet <edumazet@...gle.com>, Linux Kernel Network Developers <netdev@...r.kernel.org> Subject: Re: [PATCH net-next 1/1] driver: ipvlan: Add the sanity check for ipvlan mode Hi David & Mahesh, On Tue, Nov 29, 2016 at 4:08 AM, David Miller <davem@...emloft.net> wrote: > From: Mahesh Bandewar (महेश बंडेवार) <maheshb@...gle.com> > Date: Mon, 28 Nov 2016 11:02:45 -0800 > >> On Mon, Nov 28, 2016 at 5:23 AM, <fgao@...ai8.com> wrote: >> >>> From: Gao Feng <fgao@...ai8.com> >>> >>> The ipvlan mode variable "nval" is from userspace, so the ipvlan codes >>> should check if the mode variable "nval" is valid. >>> >>> Signed-off-by: Gao Feng <fgao@...ai8.com> >>> --- >>> drivers/net/ipvlan/ipvlan_main.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_ >>> main.c >>> index ab90b22..537b5a9 100644 >>> --- a/drivers/net/ipvlan/ipvlan_main.c >>> +++ b/drivers/net/ipvlan/ipvlan_main.c >>> @@ -65,6 +65,9 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, >>> u16 nval) >>> struct net_device *mdev = port->dev; >>> int err = 0; >>> >>> + if (nval >= IPVLAN_MODE_MAX) >>> + return -EINVAL; >>> + >>> >> I'm curious to know how you encountered this issue? The values are >> validated in ipvlan_nl_validate() and it should fail at that time itself. > > I'm not applying this without at least a better explanation. Sorry, I didn't find the function "ipvlan_nl_validate" during reading the ipvlan codes. Regards Feng
Powered by blists - more mailing lists