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:	Tue, 02 Jun 2009 02:54:54 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	error27@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: potential null dereference in proto_register()

From: Dan Carpenter <error27@...il.com>
Date: Tue, 2 Jun 2009 11:50:52 +0300 (EAT)

> There is a potential null dereference in proto_register() 
> from net/core/sock.c
> 
> prot->rsk_prot can be null on line 2161 but we dereference it on line 
> 2167.
> 
>   2161  out_free_request_sock_slab:
>   2162          if (prot->rsk_prot && prot->rsk_prot->slab) {
>   2163                  kmem_cache_destroy(prot->rsk_prot->slab);
>   2164                  prot->rsk_prot->slab = NULL;
>   2165          }
>   2166  out_free_request_sock_slab_name:
>   2167          kfree(prot->rsk_prot->slab_name);
> 
> Found by smatch.

This won't ever happen because a protocol that provides a twsk_prot
has to provide a rsk_prot too.
--
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