From Bugzilla Helper: User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.18-12.5 i686; Nav) Description of problem: We have system where username and userid number are same. Usernames are formed using this pattern: YYNNNNN Where YY is last two numbers of year and NNNNN is running number. If fact this is student number. For example my number is student number is 9700265. So my user-id is quite large, it is 9700265. Then I try to set quota for my account: # /usr/sbin/edquota -p quotaproto-op 9700265 edquota: Error while getting quota from /dev/cciss/c0d1p2 for 9700265: Invalid argument edquota: Error while getting quota from /dev/cciss/c0d0p6 for 9700265: Invalid argument Quota won't work for me, or anybody else with 9XNNNNN type user-id/name. On the other hand if I we have useid which starts with 00NNNNN, 01NNNNN or 02NNNNN they will work because their UID's are much smaller. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Try setting quota with BIG userid's. Actual Results: Quota doesn't work for "old" people. ;) To be serious: some people are able to fill whole filesystem. (/var and /home). Additional info: quota-3.03-1
Oh, too much spelling errors...sorry. I hope you get the idea.
I have an errata queued up for this already, as and when QA get to it, it'll be released. [copeland@porkchop copeland]$ latest-pkg dist-7.3-errata-candidate quota /mnt/redhat/beehive/comps/dist/7.3-errata-candidate/quota/3.06-4/SRPMS/quota-3.06-4.src.rpm NOTE: the source rpm (ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/quota-3.06-4.src.rpm) currently in rawhide for 8.0 is the same code for 7.3-errata-candidate. you can download this and issue 'rpmbuild --rebuild quota-3.06-4.src.rpm' and install the resulting rpms to fix this issue Phil =--=
I downloaded the source package, builded it as instructed and installed it with command 'rpm -Uvh /usr/src/redhat/RPMS/i386/quota-3.06-4.i386.rpm'. To make sure there is no old quota around I also rebooted the machine. This patch does _not_ work for us. We are getting similar errors as before. Like this: [root@telinux1 pkoistin]# quota -v 9700265 quota: Error while getting quota from /dev/cciss/c0d1p2 for 9700265: Invalid argument quota: Error while getting quota from /dev/cciss/c0d0p6 for 9700265: Invalid argument quota: Error while getting quota from 193.167.196.19:/home/perjantai for 9700265: Connection refused quota: Error while getting quota from 193.167.196.19:/perjantai/home/hk/perjantai for 9700265: Connection refused Disk quotas for user #9700265 (uid 9700265): none [root@telinux1 pkoistin]# Last two errors should not have any revelance to this bug.
Ok,.. lets have a look at this again [root@bryce2 SPECS]# rpm -Uvh /usr/src/redhat/RPMS/i386/quota-3.06-4.i386.rpm Ok lets create a partition with quota enabled /dev/hdb9 2743460 2252040 352060 87% /compile [root@bryce2 /]# quotacheck -c /dev/hdb9 [root@bryce2 /]# mount ... /dev/hdb9 on /compile type ext3 (rw,quota) ok lets create a user [root@alpha root]# useradd qwerty -u 9700265 -d /compile/qwerty Ok and a test one [root@bryce2 /]# useradd test -u 9700 -d /compile/qwerty add some quotas,... ok lets see how we do [root@bryce2 /]# quota test Disk quotas for user test (uid 9700): Filesystem blocks quota limit grace files quota limit grace /dev/hdb9 8 1000 2000 2 0 0 [root@bryce2 /]# quota qwerty quota: Error while getting quota from /dev/hdb9 for 9700265: Invalid argument Disk quotas for user qwerty (uid 9700265): none An strace shows up test ---- geteuid32() = 0 quotactl(0xd00 /* Q_??? */|USRQUOTA, "/dev/hdb9", 9700, {0, 0, 2, 2000, 1000, 8192, 0, 0}) = 0 qwerty ------ geteuid32() = 0 quotactl(0xd00 /* Q_??? */|USRQUOTA, "/dev/hdb9", 9700265, {0, 0, 0, 0, 0, 1073813768, 70, 1073814272}) = -1 EINVAL (Invalid argument) Humm looks like a kernel fault not the userland (tracked to quotaio_v2.c:645 where this code is executed if (quotactl(QCMD(Q_V2_GETQUOTA, h->qh_type), h->qh_quotadev, id, (void *)&kdqblk) < 0) { This call fails. (structure snapshot in next attachment) include/linux/quota.h:long quotactl __P ((int, const char *, qid_t, __kernel_caddr_t));
Created attachment 74568 [details] The structure state when it all goes horribly wrong,...
Structure is properly formed... Ah,.. there we go,... linux/fs/dquot.c +2060 if (id & ~0xFFFF) goto out; someone didn't notice that uid_t is (2^32)-1 not (2^16)-1 Should be if (id & ~0xFFFFFFFF) actually, that check could be pulled out altogether I think (looking at linux-2.5.33) Kernel bug Phil =--=
*** Bug 69936 has been marked as a duplicate of this bug. ***
Offtopic comment: which is the name of the debugger that this screengrab is taken from? It looks nice. ;)
Ok, the kernel fix makes edquota work, but after running checkquota on the filesystem, the highuid user still has their information show up for (their uid - 65536) as reported by repquota.
recompiling the quota rpm using '--with-ext2direct=no' fixes the other quota utils to work properly...
Could you give me the new kernel for testdrive before releasing the errata?
Thoron, the struct snapshot was from using 'ddd' and cut out using 'xv's screen grab feature. Anyway Current kernel >= 2.4.18-14 has the quota fix in. You should be able to find it in rawhide I don't believe this will be fixed for the release as various deadlines have elapsed though 8/ possibly an errata item after the fact I fear Phil =--=
Let me make myself clear: are you saying that you are not going to release Red Hat 7.3 security advisory about this? If this is missing from Red Hat 8.0 or whatever you are talking about, it doesn't matter to me now. (Althought it would be nice.) Thank you very much for the patch, I will install the new kernel (from Raw Hide) and report if it works with 7.3 system.
I was refering to the 'about to go out the door and onto store shelves' release. All resources here are currently focused on makeing that product happen to a deadline. As soon as thats out of the way then we'll go firefighting the 6.2->7.3 issues. Even if I built the quota errata right now (actually, I have), it has to go through QA first and they're backlogged with other work. You won't see it for some time. Phil =--=
Thank you very much about the clarification. I hope use of Raw Hide kernel don't cause me any problems, well I can always go back to kernel which works for me, but does not have proper quota support. I am looking forward to see that new kernel appear in public Raw Hide archive soon.
Hi! I see no new kernel in Raw Hide. I would realy like to beta test this kernel before you release the official errata, just to make sure it works. Could you deliver me the new kernel off the record? (Well, this is that record, but anyway. Can you be flexible with this issue, or is it forbidden by management?)
Humm I thought it was already in rawhide, but apparently not. It is available through the beta test program though. Phil =--=
Stupid question: What is beta test program and how can I join to it?
I am willing to test 7.3 errata kernel before it's officially released, so that we can be sure it works.
Problem is fixed with http://rhn.redhat.com/errata/RHSA-2002-206.html Thank you!