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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080123105140.3406e25b@lxorguk.ukuu.org.uk>
Date:	Wed, 23 Jan 2008 10:51:40 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Remove BKL from sysctl(2)

On Tue, 22 Jan 2008 23:27:27 +0300
Alexey Dobriyan <adobriyan@...il.com> wrote:

> /proc/sys part of sysctl code runs without BKL held, so BKL during
> sysctl(2) is useless. Remove misleading comment and "protection" around
> coredumping code -- kernel.core_pattern can be written without BKL.
> 
> do_sysctl() and lookup in /proc/sys use identical iterators, so any locking
> bug BKL supposedly fixed in sysctl(2) code we should have in /proc/sys
> code anyway.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>

NAK

The core dump locking is now totally unprotected rather than slightly
dubious. This patch needs to go in together with a parallel patch to
actually lock properly. You've made a bug worse not fixed it.

There are cases that updating the corepath name and dumping a core at the
same moment can result in the wrong thing being exec()'d or a file being
opened which is a mix of the old and new name and could go anywhere.

I see two variants on your patch that work

#1	Replace the lock_kernel with a sysctl_update mutex and fix both
paths
#2	Add locking specifically to the corename path



Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ