lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Jun 2008 23:59:26 -0500
From:	Eric Sandeen <>
To:	ext4 development <>
CC:	Theodore Tso <>
Subject: blkid oddities with stale devices in the cache

This is w.r.t.

Dave had a few stale entries in; label from a usb key showed
up under several non-existent, stale device names.  fstab had LABEL=,
mounting by label failed because blkid returned a stale, nonexistent device.

It seems there's a problem in blkid_verify():

        if (((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) ||
            (fstat(probe.fd, &st) < 0)) {
                if (probe.fd >= 0) close(probe.fd);
                if ((errno != EPERM) && (errno != EACCES) &&
                    (errno != ENOENT)) {
                            printf("blkid_verify: error %s (%d) while "
                                   "opening %s\n", strerror(errno), errno,
                        return NULL;
                /* We don't have read permission, just return cache data. */
                    printf("returning unverified data for %s\n",
                return dev;

We find the bad/stale device in the cache, and stat it - if the device
doesn't exist, we get ENOENT.  But we return the stale data for the
nonexistent device anyway.  Eh?;a=commitdiff;h=8bcaaabb1a023af4852dbf0dba76249982c62e40

did this:

When a nonprivileged user uses the blkid command, we want to keep the
cached filesystem information, and opening a device file could result
in an EACCESS or ENOENT (if an intervening directory is mode 700).  We
were previously testing for EPERM, which was really the wrong error
code to be testing against.

But do we really want to do this in the case of ENOENT?  It seems like
this is going to grow a crop of missing devices in the cache, no?


To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists