[PATCH v3 0/4] ext4: fix use-after-free in ext4_xattr_set_entry

Baokun Li posted 4 patches 3 years, 10 months ago
fs/ext4/inline.c |  3 +++
fs/ext4/inode.c  |  3 +--
fs/ext4/xattr.c  |  6 ++++--
fs/ext4/xattr.h  | 13 +++++++++++++
4 files changed, 21 insertions(+), 4 deletions(-)
[PATCH v3 0/4] ext4: fix use-after-free in ext4_xattr_set_entry
Posted by Baokun Li 3 years, 10 months ago
This series adds a macro for whether there is space for xattr in
ext4 inode, and fixes some problems with this macro.

V1->V2:
	Split the patch to make the logic clearer.
	Rename macro to EXT4_INODE_HAVE_XATTR_SPACE.
V2->V3:
	Rename macro to EXT4_INODE_HAS_XATTR_SPACE.

Baokun Li (4):
  ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h
  ext4: fix use-after-free in ext4_xattr_set_entry
  ext4: correct max_inline_xattr_value_size computing
  ext4: correct the misjudgment in ext4_iget_extra_inode

 fs/ext4/inline.c |  3 +++
 fs/ext4/inode.c  |  3 +--
 fs/ext4/xattr.c  |  6 ++++--
 fs/ext4/xattr.h  | 13 +++++++++++++
 4 files changed, 21 insertions(+), 4 deletions(-)

-- 
2.31.1
Re: [PATCH v3 0/4] ext4: fix use-after-free in ext4_xattr_set_entry
Posted by Theodore Ts'o 3 years, 9 months ago
On Thu, 16 Jun 2022 10:13:54 +0800, Baokun Li wrote:
> This series adds a macro for whether there is space for xattr in
> ext4 inode, and fixes some problems with this macro.
> 
> V1->V2:
> 	Split the patch to make the logic clearer.
> 	Rename macro to EXT4_INODE_HAVE_XATTR_SPACE.
> V2->V3:
> 	Rename macro to EXT4_INODE_HAS_XATTR_SPACE.
> 
> [...]

Applied, thanks!

[1/4] ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h
      commit: ff528f6b155ce79adf38583a66867d8e54cbd460
[2/4] ext4: fix use-after-free in ext4_xattr_set_entry
      commit: 0847102f2b38b43f7352ed8a7f714a291ed1513d
[3/4] ext4: correct max_inline_xattr_value_size computing
      commit: 3d783a3751995003002a5f4f6d333c7c02c7966e
[4/4] ext4: correct the misjudgment in ext4_iget_extra_inode
      commit: 31c5d92b53629452d669980d17adbd22f2af0d26

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>
Re: [PATCH v3 0/4] ext4: fix use-after-free in ext4_xattr_set_entry
Posted by Theodore Ts'o 3 years, 9 months ago
On Thu, 16 Jun 2022 10:13:54 +0800, Baokun Li wrote:
> This series adds a macro for whether there is space for xattr in
> ext4 inode, and fixes some problems with this macro.
> 
> V1->V2:
> 	Split the patch to make the logic clearer.
> 	Rename macro to EXT4_INODE_HAVE_XATTR_SPACE.
> V2->V3:
> 	Rename macro to EXT4_INODE_HAS_XATTR_SPACE.
> 
> [...]

Applied, thanks!

[1/4] ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h
      commit: ff528f6b155ce79adf38583a66867d8e54cbd460
[2/4] ext4: fix use-after-free in ext4_xattr_set_entry
      commit: 0847102f2b38b43f7352ed8a7f714a291ed1513d
[3/4] ext4: correct max_inline_xattr_value_size computing
      commit: 3d783a3751995003002a5f4f6d333c7c02c7966e
[4/4] ext4: correct the misjudgment in ext4_iget_extra_inode
      commit: 31c5d92b53629452d669980d17adbd22f2af0d26

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>