linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 214665] security bug:using "truncate" bypass disk quotas limit
Date: Mon, 11 Oct 2021 14:24:50 +0000	[thread overview]
Message-ID: <bug-214665-13602-dQr4tqBLp1@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214665-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=214665

Lukas Czerner (lczerner@redhat.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lczerner@redhat.com

--- Comment #3 from Lukas Czerner (lczerner@redhat.com) ---
Quotas help to control the amount of space and number of inodes used. If the
sparse file (created by truncate, or seek/write, or any other method available)
does not actually consume the fs space, then it simply can't be accounted for
by quota. So as Ted already said it is working as expected.

Back to your scenario. Quota has nothing to say about how the files are
manipulated so if the program copying/decompressing or otherwise manipulating
the sparse file decides to actually write the zeros and thus allocate the
space, so be it. That's hardly a bug in quota or file system itself.

If your expectation is that while manipulating the sparse file, the file will
remain sparse, you should make sure that the tools you're using will actually
do what you want. Note that tar does have --sparse options which, if I
understand your example correctly, should work as you expect.

Some basic information about sparse can be found here files
https://en.wikipedia.org/wiki/Sparse_file

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-10-11 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 10:23 [Bug 214665] New: security bug:using "truncate" bypass disk quotas limit bugzilla-daemon
2021-10-10  0:20 ` [Bug 214665] " bugzilla-daemon
2021-10-11  6:24 ` bugzilla-daemon
2021-10-11 14:24 ` bugzilla-daemon [this message]
2021-10-11 14:43 ` bugzilla-daemon
2021-10-11 14:47 ` bugzilla-daemon
2021-10-11 17:05 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-214665-13602-dQr4tqBLp1@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).