Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1054596

Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected"

From Bernhard Übelacker <bernhardu@mailbox.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected"
Date 2021-04-04 15:10 +0200
Message-ID <C0aFP-52b-1@gated-at.bofh.it> (permalink)
References <BZOch-7Si-1@gated-at.bofh.it> <BZOch-7Si-1@gated-at.bofh.it> <BZOch-7Si-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Dear Maintainer,
tried to locate the exact smashing.
It looks like the ioctl(EXT2_IOC_GETFLAGS) takes an int* parameter,
but writes 8 bytes instead of just sizeof(int) to the given address.

Kind regards,
Bernhard


     Old value = (void *) 0xf759b62c03711000
     New value = (void *) 0xf759b62c00000000
     0x00007ffff7ec0cc7 in ioctl () at ../sysdeps/unix/syscall-template.S:120
     120     ../sysdeps/unix/syscall-template.S: Datei oder Verzeichnis nicht gefunden.
     1: x/i $pc
     => 0x7ffff7ec0cc7 <ioctl+7>:    cmp    $0xfffffffffffff001,%rax
     (gdb) bt
     #0  0x00007ffff7ec0cc7 in ioctl () at ../sysdeps/unix/syscall-template.S:120
     #1  0x00007ffff7fbcb17 in fgetflags (name=name@entry=0x7fffffffe83f "/dev/dri/card0", flags=flags@entry=0x7fffffffe3e0) at ../../../../lib/e2p/fgetflags.c:90
     #2  0x00005555555554d5 in list_attributes (name=name@entry=0x7fffffffe83f "/dev/dri/card0") at ../../../misc/lsattr.c:85
     #3  0x00005555555556c9 in lsattr_args (name=0x7fffffffe83f "/dev/dri/card0") at ../../../misc/lsattr.c:134
     #4  0x0000555555555369 in main (argc=<optimized out>, argv=<optimized out>) at ../../../misc/lsattr.c:221

https://sources.debian.org/src/e2fsprogs/1.46.2-1/lib/e2p/fgetflags.c/#L90
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/lib/e2p/fgetflags.c#n90

Back to linux.debian.bugs.dist | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Marc Haber <mh+debian-packages@zugschlus.de> - 2021-04-03 15:10 +0200
  Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Bernhard Übelacker <bernhardu@mailbox.org> - 2021-04-04 15:10 +0200
    Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Chris Hofstaedtler <zeha@debian.org> - 2021-04-04 22:40 +0200
      Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Marc Haber <mh+debian-bugs@zugschlus.de> - 2021-04-04 23:00 +0200
        Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Chris Hofstaedtler <zeha@debian.org> - 2021-04-05 01:00 +0200
          Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" "Theodore Ts'o" <tytso@mit.edu> - 2021-04-05 23:40 +0200
            Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Guillem Jover <guillem@hadrons.org> - 2021-04-24 17:00 +0200
              Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Chris Hofstaedtler <zeha@debian.org> - 2021-04-24 21:40 +0200
      Bug#986332: lsattr on certiain files in /dev results in "stack smashing detected" Bernhard Übelacker <bernhardu@mailbox.org> - 2021-04-04 23:10 +0200

csiph-web