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] [day] [month] [year] [list]
Message-ID: <CAGe7X7kDBqTn_G458pAvDMJPw6GUjrZAow1DEkzZJiry+kNH1A@mail.gmail.com>
Date: Mon, 8 Dec 2025 11:07:52 -0800
From: Mark Fasheh <mark@...heh.com>
To: Heming Zhao <heming.zhao@...e.com>
Cc: Joseph Qi <joseph.qi@...ux.alibaba.com>, 
	Linus Torvalds <torvalds@...uxfoundation.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Dmitry Antipov <dmantipov@...dex.ru>, linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
	mm-commits@...r.kernel.org, Pasha Tatashin <pasha.tatashin@...een.com>
Subject: Re: [GIT PULL] non-MM updates for 6.19-rc1

On Sun, Dec 7, 2025 at 11:58 PM Heming Zhao <heming.zhao@...e.com> wrote:
>
> On Mon, Dec 08, 2025 at 12:01:09PM +0800, Joseph Qi wrote:
> > It seems now new_xh->xh_count is 0. That's means, it is trying to add a
> > new entry and here 'last' is pointing the next free entry.
> > If so, the original code seems right.
> >
> > Heming, could you please verify this? I'm not familiar with this logic...
> >
> > Thanks,
> > Joseph

Thanks Joseph and Heming for looking into this.


> In ocfs2_reflink_xattrs(), when preserve_security is false, the function sets
> 'args.xattr_reflinked'. IMUC, it means that if users want to preserve security
> xattr items, the args.xattr_reflinked is NULL, this then results in
> ocfs2_reflink_xattr_header() not executing the cleanup jobs, (in the code area
> defined by "if (args->xattr_reflinked && !args->xattr_reflinked(xe))").
>
> Regarding the clean jobs:
> - by default, it only handles three types:
>   OCFS2_XATTR_INDEX_[SECURITY|POSIX_ACL_ACCESS|POSIX_ACL_DEFAULT]
> - it cleans the first item and shifts forward the remaining items.
>
> It seems Linus' patch does not handle all cases. If new_xh->xh_count is 1,
> le16_add_cpu(&new_xh->xh_count, -1) makes it to 0, and it will miss the cleanup
> job.

It's been a while since I've look at Ocfs2 xattr so take what I say
with a grain of salt :)

That said, I agree that the cleanup code looks suspect. I think the
answer is to always memset the entry that we just removed even when
xh_count becomes zero.

Thanks,
  --Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ