Bug 878859 - [xfs/projid32bit] Setting projid32bit that is higher than 32-bit succeeds
Summary: [xfs/projid32bit] Setting projid32bit that is higher than 32-bit succeeds
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xfsprogs
Version: 6.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Filesystem QE
Depends On:
Blocks: 886216
TreeView+ depends on / blocked
Reported: 2012-11-21 12:26 UTC by Boris Ranto
Modified: 2013-03-04 00:22 UTC (History)
10 users (show)

Fixed In Version: xfsprogs-3.1.1-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-21 11:00:59 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0481 0 normal SHIPPED_LIVE xfsprogs bug fix and enhancement update 2013-02-21 12:44:16 UTC

Description Boris Ranto 2012-11-21 12:26:29 UTC
Description of problem:
xfs_quota allows higher than 32-bit projid to be set simply by overflowing the integer.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create and mount projid32bit enabled fs
mkfs.xfs -i projid32bit=1 /dev/sda2
mount -o pquota /dev/sda2 /media
2. Try setting higher than 32-bit projid with xfs_quota
xfs_quota -x -c 'project -s -p /media/file 5123456789' /dev/sda2
3. Check the projid
xfs_io -r -c lsproj /media/file
Actual results:
The xfs_quota command succeeds and xfs_io reports projid to be 828489493 = 5123456789 - 2**32.

Expected results:
The xfs_quota fails to set the higher than 32-bit projid.

Additional info:
This is easily reproducible with xfstests test case no. 244 (the last test fails).

Comment 2 Dave Chinner 2012-11-23 01:13:59 UTC
This isn't a kernel problem - the ioctl can only pass a 32 bit value. The bug will be in the userspace xfs_quota command, and it looks like it was fixed quite some time ago upstream by commit 272f4db5 ("xfsprogs: validate string -> number conversion").


Comment 5 Eric Sandeen 2012-11-28 22:34:26 UTC
Ok, the commit dave points at is easily applied & tested, I'm happy to respin it if we do get a blocker approved.

Comment 6 Eric Sandeen 2012-11-30 22:12:35 UTC
xfsprogs-3.1.1-10.el6 building now w/ this fix.

Comment 10 errata-xmlrpc 2013-02-21 11:00:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.