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>] [day] [month] [year] [list]
Date:	Mon, 7 Jul 2014 14:41:55 +0100
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	Mike Cardwell <linux@...ts.grepular.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: /proc/net/ symlink interacts badly with threads (Re: Procfs race
 condition bug)

On Fri, 4 Jul 2014 11:13:11 +0100
Mike Cardwell <linux@...ts.grepular.com> wrote:

> I originally posted this two years ago (*) but received no response. I
> just had a look and the problem still exists on the 3.14 kernel I am
> currently running.
> 
> I *think* I've uncovered a race condition bug in procfs. If I attempt to

I don't think you have found a race condition.

/proc/net/tcp is a symbolic link to /proc/self/net/tcp

Your thread does an open of /proc/net/tcp, which is a symlink
to /proc/self/net/tcp. If your thread id matches your process id then all
will be as you expect, if not then all will be pear shaped.

As far as I can see the code is doing precisely what it should do. It's
just that the use of the symlink when namespaces were added produces some
rather odd effects. 

It's certainly a bug. It used to work, it's sensible it should work.

Added netdev

Alan
--
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