Public bug reported:

Using kernel 5.0.0-27-generic on Ubuntu 18.04 in a container, every
pathname in /proc/<pid>/maps is / instead of the mapped file path.

This appears to be a regression in 5.0.0-27-generic; it works on
5.0.0-25-generic. The problem can be reproduced in various Ubuntu
releases, e.g. 18.04 and 19.04.

5.0.0-25-generic (working):

$ sudo docker run ubuntu cat /proc/1/maps
56324a3f5000-56324a3fd000 r-xp 00000000 fc:01 665673                     
/bin/cat
56324a5fc000-56324a5fd000 r--p 00007000 fc:01 665673                     
/bin/cat
56324a5fd000-56324a5fe000 rw-p 00008000 fc:01 665673                     
/bin/cat
56324a8eb000-56324a90c000 rw-p 00000000 00:00 0                          [heap]
7f8ab5f91000-7f8ab6178000 r-xp 00000000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
7f8ab6178000-7f8ab6378000 ---p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
7f8ab6378000-7f8ab637c000 r--p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
7f8ab637c000-7f8ab637e000 rw-p 001eb000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
7f8ab637e000-7f8ab6382000 rw-p 00000000 00:00 0
7f8ab6382000-7f8ab63a9000 r-xp 00000000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
7f8ab6583000-7f8ab65a7000 rw-p 00000000 00:00 0
7f8ab65a9000-7f8ab65aa000 r--p 00027000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
7f8ab65aa000-7f8ab65ab000 rw-p 00028000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
7f8ab65ab000-7f8ab65ac000 rw-p 00000000 00:00 0
7ffc25954000-7ffc25975000 rw-p 00000000 00:00 0                          [stack]
7ffc259f1000-7ffc259f4000 r--p 00000000 00:00 0                          [vvar]
7ffc259f4000-7ffc259f5000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]

5.0.0-27-generic (broken):

$ sudo docker run ubuntu cat /proc/1/maps
55de0e052000-55de0e05a000 r-xp 00000000 fc:01 665673                     /
55de0e259000-55de0e25a000 r--p 00007000 fc:01 665673                     /
55de0e25a000-55de0e25b000 rw-p 00008000 fc:01 665673                     /
55de0fcb3000-55de0fcd4000 rw-p 00000000 00:00 0                          [heap]
7f7a8d881000-7f7a8da68000 r-xp 00000000 fc:01 666073                     /
7f7a8da68000-7f7a8dc68000 ---p 001e7000 fc:01 666073                     /
7f7a8dc68000-7f7a8dc6c000 r--p 001e7000 fc:01 666073                     /
7f7a8dc6c000-7f7a8dc6e000 rw-p 001eb000 fc:01 666073                     /
7f7a8dc6e000-7f7a8dc72000 rw-p 00000000 00:00 0
7f7a8dc72000-7f7a8dc99000 r-xp 00000000 fc:01 666055                     /
7f7a8de73000-7f7a8de97000 rw-p 00000000 00:00 0
7f7a8de99000-7f7a8de9a000 r--p 00027000 fc:01 666055                     /
7f7a8de9a000-7f7a8de9b000 rw-p 00028000 fc:01 666055                     /
7f7a8de9b000-7f7a8de9c000 rw-p 00000000 00:00 0
7ffc744bd000-7ffc744de000 rw-p 00000000 00:00 0                          [stack]
7ffc7452d000-7ffc74530000 r--p 00000000 00:00 0                          [vvar]
7ffc74530000-7ffc74531000 r-xp 00000000 00:00 0                          [vdso]

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  Using kernel 5.0.0-27-generic on Ubuntu 18.04 in a container, every
  pathname in /proc/<pid>/maps is / instead of the mapped file path.
  
  This appears to be a regression in 5.0.0-27-generic; it works on
  5.0.0-25-generic. The problem can be reproduced in various Ubuntu
  releases, e.g. 18.04 and 19.04.
  
  5.0.0-25-generic (working):
  
+ ```
  $ sudo docker run ubuntu cat /proc/1/maps
  56324a3f5000-56324a3fd000 r-xp 00000000 fc:01 665673                     
/bin/cat
  56324a5fc000-56324a5fd000 r--p 00007000 fc:01 665673                     
/bin/cat
  56324a5fd000-56324a5fe000 rw-p 00008000 fc:01 665673                     
/bin/cat
  56324a8eb000-56324a90c000 rw-p 00000000 00:00 0                          
[heap]
  7f8ab5f91000-7f8ab6178000 r-xp 00000000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab6178000-7f8ab6378000 ---p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab6378000-7f8ab637c000 r--p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab637c000-7f8ab637e000 rw-p 001eb000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
- 7f8ab637e000-7f8ab6382000 rw-p 00000000 00:00 0 
+ 7f8ab637e000-7f8ab6382000 rw-p 00000000 00:00 0
  7f8ab6382000-7f8ab63a9000 r-xp 00000000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
- 7f8ab6583000-7f8ab65a7000 rw-p 00000000 00:00 0 
+ 7f8ab6583000-7f8ab65a7000 rw-p 00000000 00:00 0
  7f8ab65a9000-7f8ab65aa000 r--p 00027000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
  7f8ab65aa000-7f8ab65ab000 rw-p 00028000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
- 7f8ab65ab000-7f8ab65ac000 rw-p 00000000 00:00 0 
+ 7f8ab65ab000-7f8ab65ac000 rw-p 00000000 00:00 0
  7ffc25954000-7ffc25975000 rw-p 00000000 00:00 0                          
[stack]
  7ffc259f1000-7ffc259f4000 r--p 00000000 00:00 0                          
[vvar]
  7ffc259f4000-7ffc259f5000 r-xp 00000000 00:00 0                          
[vdso]
  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]
+ ```
+ 
  5.0.0-27-generic (broken):
  
  $ sudo docker run ubuntu cat /proc/1/maps
  55de0e052000-55de0e05a000 r-xp 00000000 fc:01 665673                     /
  55de0e259000-55de0e25a000 r--p 00007000 fc:01 665673                     /
  55de0e25a000-55de0e25b000 rw-p 00008000 fc:01 665673                     /
  55de0fcb3000-55de0fcd4000 rw-p 00000000 00:00 0                          
[heap]
  7f7a8d881000-7f7a8da68000 r-xp 00000000 fc:01 666073                     /
  7f7a8da68000-7f7a8dc68000 ---p 001e7000 fc:01 666073                     /
  7f7a8dc68000-7f7a8dc6c000 r--p 001e7000 fc:01 666073                     /
  7f7a8dc6c000-7f7a8dc6e000 rw-p 001eb000 fc:01 666073                     /
- 7f7a8dc6e000-7f7a8dc72000 rw-p 00000000 00:00 0 
+ 7f7a8dc6e000-7f7a8dc72000 rw-p 00000000 00:00 0
  7f7a8dc72000-7f7a8dc99000 r-xp 00000000 fc:01 666055                     /
- 7f7a8de73000-7f7a8de97000 rw-p 00000000 00:00 0 
+ 7f7a8de73000-7f7a8de97000 rw-p 00000000 00:00 0
  7f7a8de99000-7f7a8de9a000 r--p 00027000 fc:01 666055                     /
  7f7a8de9a000-7f7a8de9b000 rw-p 00028000 fc:01 666055                     /
- 7f7a8de9b000-7f7a8de9c000 rw-p 00000000 00:00 0 
+ 7f7a8de9b000-7f7a8de9c000 rw-p 00000000 00:00 0
  7ffc744bd000-7ffc744de000 rw-p 00000000 00:00 0                          
[stack]
  7ffc7452d000-7ffc74530000 r--p 00000000 00:00 0                          
[vvar]
  7ffc74530000-7ffc74531000 r-xp 00000000 00:00 0                          
[vdso]

** Description changed:

  Using kernel 5.0.0-27-generic on Ubuntu 18.04 in a container, every
  pathname in /proc/<pid>/maps is / instead of the mapped file path.
  
  This appears to be a regression in 5.0.0-27-generic; it works on
  5.0.0-25-generic. The problem can be reproduced in various Ubuntu
  releases, e.g. 18.04 and 19.04.
  
  5.0.0-25-generic (working):
  
- ```
  $ sudo docker run ubuntu cat /proc/1/maps
  56324a3f5000-56324a3fd000 r-xp 00000000 fc:01 665673                     
/bin/cat
  56324a5fc000-56324a5fd000 r--p 00007000 fc:01 665673                     
/bin/cat
  56324a5fd000-56324a5fe000 rw-p 00008000 fc:01 665673                     
/bin/cat
  56324a8eb000-56324a90c000 rw-p 00000000 00:00 0                          
[heap]
  7f8ab5f91000-7f8ab6178000 r-xp 00000000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab6178000-7f8ab6378000 ---p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab6378000-7f8ab637c000 r--p 001e7000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab637c000-7f8ab637e000 rw-p 001eb000 fc:01 666073                     
/lib/x86_64-linux-gnu/libc-2.27.so
  7f8ab637e000-7f8ab6382000 rw-p 00000000 00:00 0
  7f8ab6382000-7f8ab63a9000 r-xp 00000000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
  7f8ab6583000-7f8ab65a7000 rw-p 00000000 00:00 0
  7f8ab65a9000-7f8ab65aa000 r--p 00027000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
  7f8ab65aa000-7f8ab65ab000 rw-p 00028000 fc:01 666055                     
/lib/x86_64-linux-gnu/ld-2.27.so
  7f8ab65ab000-7f8ab65ac000 rw-p 00000000 00:00 0
  7ffc25954000-7ffc25975000 rw-p 00000000 00:00 0                          
[stack]
  7ffc259f1000-7ffc259f4000 r--p 00000000 00:00 0                          
[vvar]
  7ffc259f4000-7ffc259f5000 r-xp 00000000 00:00 0                          
[vdso]
  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]
- ```
  
  5.0.0-27-generic (broken):
  
  $ sudo docker run ubuntu cat /proc/1/maps
  55de0e052000-55de0e05a000 r-xp 00000000 fc:01 665673                     /
  55de0e259000-55de0e25a000 r--p 00007000 fc:01 665673                     /
  55de0e25a000-55de0e25b000 rw-p 00008000 fc:01 665673                     /
  55de0fcb3000-55de0fcd4000 rw-p 00000000 00:00 0                          
[heap]
  7f7a8d881000-7f7a8da68000 r-xp 00000000 fc:01 666073                     /
  7f7a8da68000-7f7a8dc68000 ---p 001e7000 fc:01 666073                     /
  7f7a8dc68000-7f7a8dc6c000 r--p 001e7000 fc:01 666073                     /
  7f7a8dc6c000-7f7a8dc6e000 rw-p 001eb000 fc:01 666073                     /
  7f7a8dc6e000-7f7a8dc72000 rw-p 00000000 00:00 0
  7f7a8dc72000-7f7a8dc99000 r-xp 00000000 fc:01 666055                     /
  7f7a8de73000-7f7a8de97000 rw-p 00000000 00:00 0
  7f7a8de99000-7f7a8de9a000 r--p 00027000 fc:01 666055                     /
  7f7a8de9a000-7f7a8de9b000 rw-p 00028000 fc:01 666055                     /
  7f7a8de9b000-7f7a8de9c000 rw-p 00000000 00:00 0
  7ffc744bd000-7ffc744de000 rw-p 00000000 00:00 0                          
[stack]
  7ffc7452d000-7ffc74530000 r--p 00000000 00:00 0                          
[vvar]
  7ffc74530000-7ffc74531000 r-xp 00000000 00:00 0                          
[vdso]

** Bug watch added: github.com/dotnet/corefx/issues #40850
   https://github.com/dotnet/corefx/issues/40850

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1843018

Title:
  5.0.0-27-generic: /proc/<pid>/maps: Pathnames are '/' inside a
  container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843018/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to