Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 645824 - ext4: Don't error out the fs if the user tries to make a file too big
ext4: Don't error out the fs if the user tries to make a file too big
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Boris Ranto
:
Depends On:
Blocks: 715501
  Show dependency treegraph
 
Reported: 2010-10-22 11:02 EDT by Debbie Johnson
Modified: 2016-04-18 01:55 EDT (History)
7 users (show)

See Also:
Fixed In Version: kernel-2.6.32-84.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 715501 (view as bug list)
Environment:
Last Closed: 2011-05-23 16:27:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
script that duplicates/shows issue (1.36 KB, application/x-shellscript)
2011-01-17 12:10 EST, Debbie Johnson
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0542 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6.1 kernel security, bug fix and enhancement update 2011-05-19 07:58:07 EDT

  None (edit)
Description Debbie Johnson 2010-10-22 11:02:09 EDT
Description of problem:
ext4: Don't error out the fs if the user tries to make a file too big

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

How reproducible:

do_truncate() can call ext4_setattr() (via notify_change()).
And, ext4_setattr() can return with -EFBIG if the argument(length) of
do_truncate() is more than sbi->s_bitmap_maxbytes. At that time,
it also calls ext4_std_error() with -EFBIG.

Besides, a panic happens when ext4_setattr() returns with -EFBIG
after we mount an ext4 filesystem with errors=panic.

The following steps(Step to Reproduce) can make this problem easily.

This problem is in:
5482 if (attr->ia_valid & ATTR_SIZE) {
5483 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
5484 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
5485
5486 if (attr->ia_size > sbi->s_bitmap_maxbytes) {
5487 error = -EFBIG;
5488 goto err_out;
5489 }
5490 }
5491 }

5543 err_out:
5544 ext4_std_error(inode->i_sb, error);
5545 if (!error)
5546 error = rc;
5547 return error;
(because ext4_setattr() calls ext4_std_error() when error == -EFBIG)

This fix is already included in 2.6.36-rc1.
(http://marc.info/?l=git-commits-head&m=128121841924078&w=2)
Please apply it.

Additional info:
Comment 1 Ondrej Vasik 2010-10-22 12:25:56 EDT
filesystem package (basic system directory structure) has nothing to do with ext4 filesystem. Reassigning to kernel.
Comment 3 RHEL Product and Program Management 2010-11-01 11:59:47 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 5 Zhang Kexin 2010-11-22 21:14:58 EST
copied from http://marc.info/?l=git-commits-head&m=128121841924078&w=2 , this might explain how to reproduce the bug.

    If the user attempts to make a non-extent-mapped file to be too large,
    return EFBIG, but don't call ext4_std_err() which will end up marking
    the file system as containing an error.
Comment 6 Aristeu Rozanski 2010-12-13 10:09:06 EST
Patch(es) available on kernel-2.6.32-89.el6
Comment 8 Debbie Johnson 2011-01-17 12:10:59 EST
Created attachment 473895 [details]
script that duplicates/shows issue
Comment 12 errata-xmlrpc 2011-05-23 16:27:02 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html

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