Kernel Bug Tracker – Bug 11854
v2.6.28-rc1: readlink /proc/*/exe returns uninitialized data to userspace
Last modified: 2009-03-08 05:09:03 UTC
Subject : v2.6.28-rc1: readlink /proc/*/exe returns uninitialized data to userspace
Submitter : "Vegard Nossum" <email@example.com>
Date : 2008-10-25 17:14
References : http://marc.info/?l=linux-kernel&m=122495490201663&w=4
This entry is being used for tracking a regression from 2.6.27. Please don't
close it until the problem is fixed in the mainline.
On Sunday, 2 of November 2008, Vegard Nossum wrote:
> On Sun, Nov 2, 2008 at 5:07 PM, Rafael J. Wysocki <firstname.lastname@example.org> wrote:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> > The following bug entry is on the current list of known regressions
> > from 2.6.27. Please verify if it still should be listed and let me know
> > (either way).
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11854
> > Subject : v2.6.28-rc1: readlink /proc/*/exe returns uninitialized data to userspace
> > Submitter : Vegard Nossum <email@example.com>
> > Date : 2008-10-25 17:14 (9 days old)
> > References : http://marc.info/?l=linux-kernel&m=122495490201663&w=4
> Been trying to reproduce this one since I saw it, and I think it can
> be written off as can't reproduce :-(
> Maybe I can contribute a patch that verifies that the return value ==
> strlen(buffer), WARN_ON otherwise? And hope that somebody runs into
Is not a regression, has probably been there since at least 2.6.9, probably longer too :-)
Dropped from the list of regressions, thanks.
I just tried it on 2.6.28-rc5 and it doesn't seem to be reproducible.
[root@f10-vm1 modules]# uname -a
Linux f10-vm1 2.6.28-rc5 #1 SMP Fri Nov 28 10:03:30 IST 2008 i686 i686 i386 GNU/Linux
[root@f10-vm1 modules]# strace -e trace=readlink readlink /proc/2766/exe
readlink("/proc/2766/exe", "/bin/bash"..., 64) = 9
[root@f10-vm1 modules]# strace -e trace=readlink readlink /proc/744/exe
readlink("/proc/744/exe", "/sbin/udevd"..., 64) = 11
Let me know if I have missed something here...
Please see this thread for more info: http://lkml.org/lkml/2008/11/4/105
And patch: http://lkml.org/lkml/2008/11/11/379
So we are waiting for this to hit 2.6.28, I guess.
commit dc711ca35f9d95a1eec02118e0c298b5e3068315 in mainline
and in -stable.