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  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, 14 Oct 2014 14:27:00 -0700
From:	Cong Wang <>
To:	David Miller <>
Cc:	Cong Wang <>,
	netdev <>,,,
	Stephen Hemminger <>
Subject: Re: [Patch net] rds: avoid calling sock_kfree_s() on allocation failure

On Tue, Oct 14, 2014 at 2:03 PM, David Miller <> wrote:
> From: Cong Wang <>
> Date: Tue, 14 Oct 2014 12:35:08 -0700
>> From: Cong Wang <>
>> It is okay to free a NULL pointer but not okay to mischarge the socket optmem
>> accounting. Compile test only.
>> Reported-by:
>> Cc: Chien Yen <>
>> Cc: Stephen Hemminger <>
>> Signed-off-by: Cong Wang <>
>> Signed-off-by: Cong Wang <>
> Applied, and I'm going to add the following bug check to the tree too.
> ====================
> [PATCH] net: Trap attempts to call sock_kfree_s() with a NULL pointer.
> Unlike normal kfree() it is never right to call sock_kfree_s() with
> a NULL pointer, because sock_kfree_s() also has the side effect of
> discharging the memory from the sockets quota.
> Signed-off-by: David S. Miller <>

Acked-by: Cong Wang <>

Sounds reasonable. It could catch more bugs similar to this one.

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists