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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 04 Oct 2007 16:20:05 -0400
From:	Tony Battersby <>
Subject: [PATCH] net: fix kernel_accept() error path

If accept() returns an error, kernel_accept() releases the new socket
but passes a pointer to the released socket back to the caller.  Make it
pass back NULL instead.

Signed-off-by: Tony Battersby <>
--- linux-2.6.23-rc9/net/socket.c.bak	2007-10-04 15:21:17.000000000 -0400
+++ linux-2.6.23-rc9/net/socket.c	2007-10-04 15:21:22.000000000 -0400
@@ -2230,6 +2230,7 @@ int kernel_accept(struct socket *sock, s
 	err = sock->ops->accept(sock, *newsock, flags);
 	if (err < 0) {
+		*newsock = NULL;
 		goto done;

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