lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Apr 2010 20:53:01 +0400
From:	Dmitry Monakhov <dmonakhov@...nvz.org>
To:	linux-ext4@...r.kernel.org
CC:	Eric Sandeen <sandeen@...hat.com>
Subject: ext4: Do not dec quota for reserved blocks on error paths v2

If we have failed some where inside ext4_get_blocks() internals we may
have allocated some new blocks, which was not yet claimed to quota.
We have to free such blocks, but without touching quota. Quota will
be updated later on exit from ext4_get_blocks().
There are two possible ways to understand what we have to skip quota update:
1) Caller pass corresponding flag to ext4_free_blocks()
2) check that free_blocks() was indirectly called by get_blocks() 
   (i.e EXT4_I(inode)->i_delalloc_reserved_flag is set)
Second is simpler, but may result in unpredictable consequences later.
So i've chosen the first one, because caller must know which blocks it
is freeing.

Eric, please take your attention to metadata blocks handling when
you will work on new versing of  "ext4: don't use quota reservation for
speculative metadata blocks" patch.

The bug happens on heavily loaded node, or with 227'th xfstestcase and
result in incorrect i_blocks (less than expected). So truncation for
that file result in i_blocks overflow.
Seems this was the last bug which was easily triggered by 227'th testcase.


View attachment "0001-ext4-Do-not-drop-quota-for-reserved-blocks-on-error-.patch" of type "text/plain" (7214 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ