Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 227642 - /proc/*/exe symlinks with trailing garbage
Summary: /proc/*/exe symlinks with trailing garbage
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 6
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Viro
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 427887
TreeView+ depends on / blocked
 
Reported: 2007-02-07 10:44 UTC by Gary Benson
Modified: 2008-02-08 04:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-08 04:29:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gary Benson 2007-02-07 10:44:34 UTC
Description of problem:
I keep finding /proc/*/exe symlinks with trailing garbage on my box:

ultra:[~]$ cat readlink.c
#include <stdio.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
  char buf[BUFSIZ];
  int i, j, n;

  for (i = 1; i < argc; i++)
    {
      n = readlink(argv[i], buf, BUFSIZ);

      for (j = 0; j < n; j++)
        {
          char c = buf[j];
          if (c == '\\')
            printf("\\\\");
          else if (c > 32 && c < 127)
            putchar(c);
          else
            printf("\\x%02x", c);
        }
      putchar('\n');
    }
}
ultra:[~]$ gcc readlink.c -o readlink
ultra:[~]$ ./readlink /proc/30781/exe
/usr/bin/fetchmail\x00cation\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20(deleted)

Version-Release number of selected component (if applicable):
kernel-2.6.19-1.2895.fc6

How reproducible:
It seems fairly random which processes will get garbled links, but once a
process has one it keeps it until it's killed as far as I can tell.

Steps to Reproduce:
1. Run the above program on /proc/*/exe
2. Look for junk

Comment 1 Jon Stanley 2008-01-08 01:56:06 UTC
(This is a mass-update to all current FC6 kernel bugs in NEW state)

Hello,

I'm reviewing this bug list as part of the kernel bug triage project, an attempt
to isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug, however this version of Fedora is no longer
maintained.

Please attempt to reproduce this bug with a current version of Fedora (presently
Fedora 8). If the bug no longer exists, please close the bug or I'll do so in a
few days if there is no further information lodged.

Thanks for using Fedora!

Comment 2 Jon Stanley 2008-02-08 04:29:22 UTC
Per the previous comment in this bug, I am closing it as INSUFFICIENT_DATA,
since no information has been lodged for over 30 days.

Please re-open this bug or file a new one if you can provide the requested data,
and thanks for filing the original report!


Note You need to log in before you can comment on or make changes to this bug.