diff -u util-linux-2.17.2/debian/changelog util-linux-2.17.2/debian/changelog --- util-linux-2.17.2/debian/changelog +++ util-linux-2.17.2/debian/changelog @@ -1,3 +1,10 @@ +util-linux (2.17.2-0ubuntu1.10.10.2) maverick-proposed; urgency=low + + * Fixes a segfault on umount, caused due to an empty mtab entry. + (LP: #579858) + + -- Surbhi Palande Wed, 26 Jan 2011 18:25:55 +0200 + util-linux (2.17.2-0ubuntu1.10.10.1) maverick-security; urgency=low * SECURITY UPDATE: arbitrary unmount with fuse (LP: #670622) diff -u util-linux-2.17.2/mount/umount.c util-linux-2.17.2/mount/umount.c --- util-linux-2.17.2/mount/umount.c +++ util-linux-2.17.2/mount/umount.c @@ -253,15 +253,20 @@ res = mount(spec, node, NULL, MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); if (res == 0) { - struct my_mntent remnt; fprintf(stderr, _("umount: %s busy - remounted read-only\n"), spec); - remnt.mnt_type = remnt.mnt_fsname = NULL; - remnt.mnt_dir = xstrdup(node); - remnt.mnt_opts = xstrdup("ro"); - if (!nomtab) + if (mc && !nomtab) { + /* update mtab if the entry is there */ + struct my_mntent remnt; + remnt.mnt_fsname = mc->m.mnt_fsname; + remnt.mnt_dir = mc->m.mnt_dir; + remnt.mnt_type = mc->m.mnt_type; + remnt.mnt_opts = "ro"; + remnt.mnt_freq = 0; + remnt.mnt_passno = 0; update_mtab(node, &remnt); + } return 0; } else if (errno != EBUSY) { /* hmm ... */ perror("remount");