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]
Date:	Fri, 19 Dec 2008 16:02:51 +0800
From:	Wang Chen <wangchen@...fujitsu.com>
To:	julia@...u.dk
CC:	Jarek Poplawski <jarkao2@...il.com>,
	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: Fix oops in dev_ifsioc()

Jarek Poplawski said the following on 2008-12-19 15:04:
> A command like this: "brctl addif br1 eth1" issued as a user gave me
> an oops when bridge module wasn't loaded. It's caused by using a dev
> pointer before checking for NULL.
> 
> Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
> ---
> 
>  net/core/dev.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 048cf11..daca72e 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3745,11 +3745,13 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
>  {
>  	int err;
>  	struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name);
> -	const struct net_device_ops *ops = dev->netdev_ops;
> +	const struct net_device_ops *ops;
>  
>  	if (!dev)
>  		return -ENODEV;
>  
> +	ops = dev->netdev_ops;
> +
>  	switch (cmd) {
>  		case SIOCSIFFLAGS:	/* Set interface flags */
>  			return dev_change_flags(dev, ifr->ifr_flags);

Subject will be changed, sorry.
Seems Julia  is doing "Move a dereference below a NULL test" check,
but why the coccinelle missed this one?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ