Setuid bits get dropped on fs-mounted partitions (2.2.2-ac7) !?!?

Philippe Troin (phil@fifi.org)
02 Mar 1999 01:07:45 -0800


Happens on 'Linux electrolyt 2.2.2-ac7 #2 Mon Mar 1 21:12:12 PST 1999
alpha unknown' which is nfs-root mounted.

While installing packages with debian's dpkg, all the installed files with
setuid bits get these cleared.

Select tcpdump output:

00:43:26.251680 electrolyt.fifi.org.3647537152 > tantale.fifi.org.nfs: 160 create fh Unknown/1 "testit.dpkg-new" (ttl 64, id 31170)

00:43:26.252005 tantale.fifi.org.nfs > electrolyt.fifi.org.3647537152: reply ok 128 create fh Unknown/1 REG 100444 ids 0/0 sz 0 nlink 1 rdev d02 fsid 809 nodeid 37 a/m/ctime 920364206.000000 920364206.000000 920364206.000000 (ttl 64, id 37188)

00:43:26.257057 electrolyt.fifi.org.3664314368 > tantale.fifi.org.nfs: 140 setattr fh Unknown/1 (ttl 64, id 31171)

00:43:26.257295 tantale.fifi.org.nfs > electrolyt.fifi.org.3664314368: reply ok 96 setattr REG 100444 ids 1000/1000 sz 0 (ttl 64, id 37189)

00:43:26.259142 electrolyt.fifi.org.3681091584 > tantale.fifi.org.nfs: 140 setattr fh Unknown/1 (ttl 64, id 31172)

00:43:26.259351 tantale.fifi.org.nfs > electrolyt.fifi.org.3681091584: reply ok 96 setattr REG 106775 ids 1000/1000 sz 0 (ttl 64, id 37190)

00:43:26.268003 electrolyt.fifi.org.3697868800 > tantale.fifi.org.nfs: 1472 write fh Unknown/1 8192 (8192) bytes @ 0 (0) (frag 31173:1480@0+) (ttl 64)

00:43:26.269195 electrolyt.fifi.org.3714646016 > tantale.fifi.org.nfs: 1436 write fh Unknown/1 1312 (1312) bytes @ 8192 (8192) (ttl 64, id 31174)

00:43:26.269490 tantale.fifi.org.nfs > electrolyt.fifi.org.3697868800: reply ok 96 write REG 100775 ids 1000/1000 sz 8192 nlink 1 rdev d02 fsid 809 nodeid 37 a/m/ctime 920364206.000000 920364206.000000 920364206.000000 (ttl 64, id 37191)
00:43:26.269821 tantale.fifi.org.nfs > electrolyt.fifi.org.3714646016: reply ok 96 write REG 100775 ids 1000/1000 sz 9504 nlink 1 rdev d02 fsid 809 nodeid 37 a/m/ctime 920364206.000000 920364206.000000 920364206.000000 (ttl 64, id 37192)

The setuid file is testit.dpkg-new which gets chmod'ed to 6775, but
for some reason the setattr gets queued before the write and the
kernel must be removing the setuid bits because of the write...

Oh, and I also get gazillions of:

kernel: nfs_free_dentries: found log/syslog, d_count=1, hashed=0
kernel: __nfs_fhget: inode 118790 still busy, i_count
kernel: __nfs_fhget: killing log/syslog filehandle
kernel: nfs_revalidate_inode: log/syslog getattr failed, ino=118790, error=-70

or

kernel: NFS: bad fh 0000000000000000000000000000000000000000000000000000000000000000
kernel: c0f383a00001d0060001d0010000080900000809000000020000000000000000

The nfs-rooted box is pretty unusable (eg: after /dev/tty1 get killed,
tty returns 'not a tty', files get garbled...)

Oh, and also tried with no_wdelay,sync, did not change anything for
the above problem and it makes things waaay slower...

Config and full tcpdump available...

Phil.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/