Re: v2.6.28-rc1: readlink /proc/*/exe returns uninitialized datato userspace

From: Al Viro
Date: Tue Nov 04 2008 - 10:13:20 EST


On Tue, Nov 04, 2008 at 10:39:19AM +0100, Vegard Nossum wrote:
> On Sun, Oct 26, 2008 at 10:08 PM, Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote:
> # uname -a
> Linux localhost.localdomain 2.6.25.11-97.fc9.i686 #1 SMP Mon Jul 21
> 01:31:09 EDT 2008 i686 i686 i386 GNU/Linux
> # prelink -mRf /sbin/udevd
> # ./a.out /proc/564/exe
> warning: /proc/564/exe: got return value 38, expected 11
> 2f7362696e2f7564657664005f47387942426e5952446e566f306868202864656c6574656429
> /sbin/udevd _G8yBBnYRDnVo0hh (deleted)
>
> Yoshiya Koyama reports that the problem exists on RHEL 2.6.9-42.ELsmp too.
>
> I don't think it's exactly the same problem as originally reported,
> because I definitely wasn't using prelinking (the prelink binary
> wasn't even installed on the machine until today). But finding the
> root cause of this may solve both problems.

switch_names() buggered in case of short names on both sides. That should
help: