Skip to content

cat doesn't handle EPERM #8068

@Hyask

Description

@Hyask

Original bug: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2112552

It boils down to this very easy reproducer: cat /proc/$$/syscall

GNU coreutils output:

skia@noble:/$ cat /proc/$$/syscall
cat: /proc/208/syscall: Operation not permitted
skia@noble:/$ echo $?
1

uutils coreutils output:

skia@questing:/$ cat /proc/$$/syscall
skia@questing:/$ echo $?
0

strace cat /proc/$$/syscall clearly shows that read() return EPERM with both binaries:

...
read(3, 0x7ffd4ef80798, 65536) = -1 EPERM (Operation not permitted)
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions