Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 602427 - ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Petr Beňas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-09 16:10 EDT by Eric Sandeen
Modified: 2015-01-04 17:59 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 11:11:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sandeen 2010-06-09 16:10:07 EDT
Should pull back:

From: Nikanth Karthikesan <knikanth@suse.de>
Date: Sun, 16 May 2010 18:00:00 +0000 (-0400)
Subject: ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
X-Git-Tag: v2.6.35-rc1~39^2~18
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6d19c42b7cf81c39632b6d4dbc514e8449bcd346

ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate

Currently using posix_fallocate one can bypass an RLIMIT_FSIZE limit
and create a file larger than the limit. Add a check for that.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
Comment 1 RHEL Product and Program Management 2010-06-09 16:13:02 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Aristeu Rozanski 2010-07-01 12:22:26 EDT
Patch(es) available on kernel-2.6.32-42.el6
Comment 6 Petr Beňas 2010-07-08 10:08:15 EDT
reproduced in 2.6.32-41.el6.x86_64, verified in 2.6.32-42.el6.x86_64
[root@dell-pe2950-01 xfstests]# uname -r
2.6.32-41.el6.x86_64
[root@dell-pe2950-01 xfstests]# ./check 228
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 dell-pe2950-01 2.6.32-41.el6.x86_64

228      - output mismatch (see 228.out.bad)
--- 228.out     2010-07-08 09:25:10.934808987 -0400
+++ 228.out.bad 2010-07-08 09:48:33.057058887 -0400
@@ -1,6 +1,6 @@
 QA output created by 228
 File size limit is now set to 100 MB.
 Let us try to preallocate 101 MB. This should fail.
-File size limit exceeded
+File size limit exceeded (core dumped)
 Let us now try to preallocate 50 MB. This should succeed.
 Test over.
Ran: 228
Failures: 228
Failed 1 of 1 tests

[root@dell-pe2950-01 xfstests]# uname -r
2.6.32-42.el6.x86_64
[root@dell-pe2950-01 xfstests]# ./check 228
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 dell-pe2950-01 2.6.32-42.el6.x86_64

228      - output mismatch (see 228.out.bad)
--- 228.out     2010-07-08 09:25:10.934808987 -0400
+++ 228.out.bad 2010-07-08 09:57:02.481348900 -0400
@@ -1,6 +1,6 @@
 QA output created by 228
 File size limit is now set to 100 MB.
 Let us try to preallocate 101 MB. This should fail.
-File size limit exceeded
+File size limit exceeded (core dumped)
 Let us now try to preallocate 50 MB. This should succeed.
 Test over.
Ran: 228
Failures: 228
Failed 1 of 1 tests
Comment 7 Eric Sandeen 2010-07-12 14:39:26 EDT
FWIW I've sent a patch upstream to get rid of the (core dumped) discrepancy in this output:

"[PATCH] xfstests 228: suppress core dump message"

http://oss.sgi.com/pipermail/xfs/2010-June/045796.html
Comment 8 releng-rhel@redhat.com 2010-11-11 11:11:24 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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