[Bug 872734] [NEW] dpkg coredumps if FIGETBSZ ioctl return -ENOTTY

Goldhead 872734 at bugs.launchpad.net
Wed Oct 12 08:50:55 UTC 2011


Public bug reported:

---
root at localhost:~# strace dpkg -S libc.so.6

...

open("/var/lib/dpkg/info/libtext-wrapi18n-perl.list", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, FIGETBSZ, 0xbfe0463c)          = -1 ENOTTY (Inappropriate ioctl for device)
open("/proc/meminfo", O_RDONLY)         = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77fb000
read(4, "MemTotal:         262144 kB\nMemF"..., 1024) = 532
close(4)                                = 0
munmap(0xb77fb000, 4096)                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault
---

This may happens on some virtual filesystems because

---
if (!blocksize && ioctl(fd, FIGETBSZ, &blocksize) < 0)
  break;
---

code in src/filesdb.c leave only first pkg->clientdata defined. Seems
like continue; should be there.

Please fix.

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

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

Title:
  dpkg coredumps if FIGETBSZ ioctl return -ENOTTY

Status in “dpkg” package in Ubuntu:
  New

Bug description:
  ---
  root at localhost:~# strace dpkg -S libc.so.6

  ...

  open("/var/lib/dpkg/info/libtext-wrapi18n-perl.list", O_RDONLY|O_LARGEFILE) = 3
  ioctl(3, FIGETBSZ, 0xbfe0463c)          = -1 ENOTTY (Inappropriate ioctl for device)
  open("/proc/meminfo", O_RDONLY)         = 4
  fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77fb000
  read(4, "MemTotal:         262144 kB\nMemF"..., 1024) = 532
  close(4)                                = 0
  munmap(0xb77fb000, 4096)                = 0
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  +++ killed by SIGSEGV +++
  Segmentation fault
  ---

  This may happens on some virtual filesystems because

  ---
  if (!blocksize && ioctl(fd, FIGETBSZ, &blocksize) < 0)
    break;
  ---

  code in src/filesdb.c leave only first pkg->clientdata defined. Seems
  like continue; should be there.

  Please fix.

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




More information about the foundations-bugs mailing list