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-prev] [day] [month] [year] [list]
Date:	Thu, 04 Oct 2007 16:55:59 -0700 (PDT)
From:	David Miller <>
Subject: Re: [PATCH] net: fix kernel_accept() error path

From: Tony Battersby <>
Date: Thu, 04 Oct 2007 18:12:53 -0400

> Here is an example of what I would consider "reasonable code" that would
> fail:
> int example()
> {
>     struct socket *conn_socket = NULL;
>     int err;
>     ...
>     if ((err = kernel_accept(sock, &conn_socket, 0)) < 0)
>         goto out_cleanup;
>     [do whatever with conn_socket]
>  out_cleanup:
>     if (conn_socket != NULL)
>         sock_release(&conn_socket);
>     return err;
> }

This is a grey area.

I'd say you shouldn't be trying to do cleanups on conn_socket unless
kernel_accept() gave you a success return.

However, kernel_accept() is guilty of leaving a stray pointer
in conn_socket, in fact a reference to freed memory.  So
from that perspective we should put your patch in.

Please resubmit, at least to me under seperate cover,thanks.
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