Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 602427

Summary: ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
Product: Red Hat Enterprise Linux 6 Reporter: Eric Sandeen <esandeen>
Component: kernelAssignee: Eric Sandeen <esandeen>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Beňas <pbenas>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: pbenas, pstehlik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 16:11:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Sandeen 2010-06-09 20:10:07 UTC
Should pull back:

From: Nikanth Karthikesan <knikanth>
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>
Signed-off-by: Amit Arora <aarora.com>
Signed-off-by: "Theodore Ts'o" <tytso>
---

Comment 1 RHEL Program Management 2010-06-09 20:13:02 UTC
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 16:22:26 UTC
Patch(es) available on kernel-2.6.32-42.el6

Comment 6 Petr Beňas 2010-07-08 14:08:15 UTC
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 18:39:26 UTC
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 16:11:24 UTC
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.