* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() [not found] ` <CAHC9VhQ-f-n+0g29MpBB3_om-e=vDqSC3h+Vn_XzpK2zpqamdQ@mail.gmail.com> @ 2025-06-05 21:51 ` Paul Moore 2025-06-06 5:39 ` Collin Funk 0 siblings, 1 reply; 12+ messages in thread From: Paul Moore @ 2025-06-05 21:51 UTC (permalink / raw) To: Stephen Smalley, linux-fsdevel Cc: brauner, linux-kernel, selinux, collin.funk1, eggert, bug-gnulib On Thu, Jun 5, 2025 at 5:40 PM Paul Moore <paul@paul-moore.com> wrote: > On Thu, Jun 5, 2025 at 12:49 PM Stephen Smalley > <stephen.smalley.work@gmail.com> wrote: > > > > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > include security.* xattrs") failed to reset err after the call to > > security_inode_listsecurity(), which returns the length of the > > returned xattr name. This results in simple_xattr_list() incorrectly > > returning this length even if a POSIX acl is also set on the inode. > > > > Reported-by: Collin Funk <collin.funk1@gmail.com> > > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > --- > > fs/xattr.c | 1 + > > 1 file changed, 1 insertion(+) > > Reviewed-by: Paul Moore <paul@paul-moore.com> Resending this as it appears that Stephen's original posting had a typo in the VFS mailing list. The original post can be found in the SELinux archives: https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > diff --git a/fs/xattr.c b/fs/xattr.c > > index 8ec5b0204bfd..600ae97969cf 100644 > > --- a/fs/xattr.c > > +++ b/fs/xattr.c > > @@ -1479,6 +1479,7 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, > > buffer += err; > > } > > remaining_size -= err; > > + err = 0; > > > > read_lock(&xattrs->lock); > > for (rbp = rb_first(&xattrs->rb_root); rbp; rbp = rb_next(rbp)) { > > -- > > 2.49.0 -- paul-moore.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-05 21:51 ` [PATCH] fs/xattr.c: fix simple_xattr_list() Paul Moore @ 2025-06-06 5:39 ` Collin Funk 2025-06-10 23:50 ` Paul Moore 0 siblings, 1 reply; 12+ messages in thread From: Collin Funk @ 2025-06-06 5:39 UTC (permalink / raw) To: Paul Moore Cc: Stephen Smalley, linux-fsdevel, brauner, linux-kernel, selinux, eggert, bug-gnulib Paul Moore <paul@paul-moore.com> writes: >> <stephen.smalley.work@gmail.com> wrote: >> > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always >> > include security.* xattrs") failed to reset err after the call to >> > security_inode_listsecurity(), which returns the length of the >> > returned xattr name. This results in simple_xattr_list() incorrectly >> > returning this length even if a POSIX acl is also set on the inode. >> > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") >> > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> >> > --- >> > fs/xattr.c | 1 + >> > 1 file changed, 1 insertion(+) >> >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > Resending this as it appears that Stephen's original posting had a > typo in the VFS mailing list. The original post can be found in the > SELinux archives: > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ Hi, responding to this message since it has the correct lists. I just booted into a kernel with this patch applied and confirm that it fixes the Gnulib tests that were failing. Reviewed-by: Collin Funk <collin.funk1@gmail.com> Tested-by: Collin Funk <collin.funk1@gmail.com> Thanks for the fix. Collin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-06 5:39 ` Collin Funk @ 2025-06-10 23:50 ` Paul Moore 2025-06-11 10:05 ` Christian Brauner 0 siblings, 1 reply; 12+ messages in thread From: Paul Moore @ 2025-06-10 23:50 UTC (permalink / raw) To: linux-fsdevel, Alexander Viro, brauner Cc: Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > Paul Moore <paul@paul-moore.com> writes: > >> <stephen.smalley.work@gmail.com> wrote: > >> > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > >> > include security.* xattrs") failed to reset err after the call to > >> > security_inode_listsecurity(), which returns the length of the > >> > returned xattr name. This results in simple_xattr_list() incorrectly > >> > returning this length even if a POSIX acl is also set on the inode. > >> > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > >> > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > >> > --- > >> > fs/xattr.c | 1 + > >> > 1 file changed, 1 insertion(+) > >> > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > Resending this as it appears that Stephen's original posting had a > > typo in the VFS mailing list. The original post can be found in the > > SELinux archives: > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > Hi, responding to this message since it has the correct lists. > > I just booted into a kernel with this patch applied and confirm that it > fixes the Gnulib tests that were failing. > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > Tested-by: Collin Funk <collin.funk1@gmail.com> > > Thanks for the fix. Al, Christian, are either of you going to pick up this fix to send to Linus? If not, any objection if I send this up? -- paul-moore.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-10 23:50 ` Paul Moore @ 2025-06-11 10:05 ` Christian Brauner 2025-06-11 15:45 ` Paul Moore 2025-06-16 14:03 ` Paul Moore 0 siblings, 2 replies; 12+ messages in thread From: Christian Brauner @ 2025-06-11 10:05 UTC (permalink / raw) To: Paul Moore Cc: linux-fsdevel, Alexander Viro, Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > Paul Moore <paul@paul-moore.com> writes: > > >> <stephen.smalley.work@gmail.com> wrote: > > >> > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > >> > include security.* xattrs") failed to reset err after the call to > > >> > security_inode_listsecurity(), which returns the length of the > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > >> > returning this length even if a POSIX acl is also set on the inode. > > >> > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > >> > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > >> > --- > > >> > fs/xattr.c | 1 + > > >> > 1 file changed, 1 insertion(+) > > >> > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > Resending this as it appears that Stephen's original posting had a > > > typo in the VFS mailing list. The original post can be found in the > > > SELinux archives: > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > Hi, responding to this message since it has the correct lists. > > > > I just booted into a kernel with this patch applied and confirm that it > > fixes the Gnulib tests that were failing. > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > Thanks for the fix. > > Al, Christian, are either of you going to pick up this fix to send to > Linus? If not, any objection if I send this up? It's been in vfs.fixes for some time already and it'll go out with the first round of post -rc1 fixes this week. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-11 10:05 ` Christian Brauner @ 2025-06-11 15:45 ` Paul Moore 2025-06-12 12:21 ` Christian Brauner 2025-06-16 14:03 ` Paul Moore 1 sibling, 1 reply; 12+ messages in thread From: Paul Moore @ 2025-06-11 15:45 UTC (permalink / raw) To: Christian Brauner Cc: linux-fsdevel, Alexander Viro, Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Wed, Jun 11, 2025 at 6:05 AM Christian Brauner <brauner@kernel.org> wrote: > > On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > > Paul Moore <paul@paul-moore.com> writes: > > > >> <stephen.smalley.work@gmail.com> wrote: > > > >> > > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > > >> > include security.* xattrs") failed to reset err after the call to > > > >> > security_inode_listsecurity(), which returns the length of the > > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > > >> > returning this length even if a POSIX acl is also set on the inode. > > > >> > > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > >> > > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > > >> > --- > > > >> > fs/xattr.c | 1 + > > > >> > 1 file changed, 1 insertion(+) > > > >> > > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > > > Resending this as it appears that Stephen's original posting had a > > > > typo in the VFS mailing list. The original post can be found in the > > > > SELinux archives: > > > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > > > Hi, responding to this message since it has the correct lists. > > > > > > I just booted into a kernel with this patch applied and confirm that it > > > fixes the Gnulib tests that were failing. > > > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > > > Thanks for the fix. > > > > Al, Christian, are either of you going to pick up this fix to send to > > Linus? If not, any objection if I send this up? > > It's been in vfs.fixes for some time already and it'll go out with the > first round of post -rc1 fixes this week. Great, thanks. I didn't see any replies on-list indicating that the patch had been picked up, so I just wanted to make sure someone was sending this up to Linus. -- paul-moore.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-11 15:45 ` Paul Moore @ 2025-06-12 12:21 ` Christian Brauner 2025-06-12 12:54 ` Stephen Smalley 0 siblings, 1 reply; 12+ messages in thread From: Christian Brauner @ 2025-06-12 12:21 UTC (permalink / raw) To: Paul Moore Cc: linux-fsdevel, Alexander Viro, Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Wed, Jun 11, 2025 at 11:45:03AM -0400, Paul Moore wrote: > On Wed, Jun 11, 2025 at 6:05 AM Christian Brauner <brauner@kernel.org> wrote: > > > > On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > > > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > > > Paul Moore <paul@paul-moore.com> writes: > > > > >> <stephen.smalley.work@gmail.com> wrote: > > > > >> > > > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > > > >> > include security.* xattrs") failed to reset err after the call to > > > > >> > security_inode_listsecurity(), which returns the length of the > > > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > > > >> > returning this length even if a POSIX acl is also set on the inode. > > > > >> > > > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > > >> > > > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > > > >> > --- > > > > >> > fs/xattr.c | 1 + > > > > >> > 1 file changed, 1 insertion(+) > > > > >> > > > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > > > > > Resending this as it appears that Stephen's original posting had a > > > > > typo in the VFS mailing list. The original post can be found in the > > > > > SELinux archives: > > > > > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > > > > > Hi, responding to this message since it has the correct lists. > > > > > > > > I just booted into a kernel with this patch applied and confirm that it > > > > fixes the Gnulib tests that were failing. > > > > > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > > > > > Thanks for the fix. > > > > > > Al, Christian, are either of you going to pick up this fix to send to > > > Linus? If not, any objection if I send this up? > > > > It's been in vfs.fixes for some time already and it'll go out with the > > first round of post -rc1 fixes this week. > > Great, thanks. I didn't see any replies on-list indicating that the > patch had been picked up, so I just wanted to make sure someone was Hm, odd. I did send a b4 ty I'm pretty sure. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-12 12:21 ` Christian Brauner @ 2025-06-12 12:54 ` Stephen Smalley 0 siblings, 0 replies; 12+ messages in thread From: Stephen Smalley @ 2025-06-12 12:54 UTC (permalink / raw) To: Christian Brauner Cc: Paul Moore, linux-fsdevel, Alexander Viro, Collin Funk, linux-kernel, selinux, eggert, bug-gnulib On Thu, Jun 12, 2025 at 8:21 AM Christian Brauner <brauner@kernel.org> wrote: > > On Wed, Jun 11, 2025 at 11:45:03AM -0400, Paul Moore wrote: > > On Wed, Jun 11, 2025 at 6:05 AM Christian Brauner <brauner@kernel.org> wrote: > > > > > > On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > > > > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > > > > Paul Moore <paul@paul-moore.com> writes: > > > > > >> <stephen.smalley.work@gmail.com> wrote: > > > > > >> > > > > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > > > > >> > include security.* xattrs") failed to reset err after the call to > > > > > >> > security_inode_listsecurity(), which returns the length of the > > > > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > > > > >> > returning this length even if a POSIX acl is also set on the inode. > > > > > >> > > > > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > > > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > > > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > > > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > > > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > > > >> > > > > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > > > > >> > --- > > > > > >> > fs/xattr.c | 1 + > > > > > >> > 1 file changed, 1 insertion(+) > > > > > >> > > > > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > > > > > > > Resending this as it appears that Stephen's original posting had a > > > > > > typo in the VFS mailing list. The original post can be found in the > > > > > > SELinux archives: > > > > > > > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > > > > > > > Hi, responding to this message since it has the correct lists. > > > > > > > > > > I just booted into a kernel with this patch applied and confirm that it > > > > > fixes the Gnulib tests that were failing. > > > > > > > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > > > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > > > > > > > Thanks for the fix. > > > > > > > > Al, Christian, are either of you going to pick up this fix to send to > > > > Linus? If not, any objection if I send this up? > > > > > > It's been in vfs.fixes for some time already and it'll go out with the > > > first round of post -rc1 fixes this week. > > > > Great, thanks. I didn't see any replies on-list indicating that the > > patch had been picked up, so I just wanted to make sure someone was > > Hm, odd. I did send a b4 ty I'm pretty sure. I didn't receive any reply fwiw. But no worries - thanks for applying it! ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-11 10:05 ` Christian Brauner 2025-06-11 15:45 ` Paul Moore @ 2025-06-16 14:03 ` Paul Moore 2025-06-16 14:13 ` Christian Brauner 1 sibling, 1 reply; 12+ messages in thread From: Paul Moore @ 2025-06-16 14:03 UTC (permalink / raw) To: Christian Brauner Cc: linux-fsdevel, Alexander Viro, Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Wed, Jun 11, 2025 at 6:05 AM Christian Brauner <brauner@kernel.org> wrote: > On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > > Paul Moore <paul@paul-moore.com> writes: > > > >> <stephen.smalley.work@gmail.com> wrote: > > > >> > > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > > >> > include security.* xattrs") failed to reset err after the call to > > > >> > security_inode_listsecurity(), which returns the length of the > > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > > >> > returning this length even if a POSIX acl is also set on the inode. > > > >> > > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > >> > > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > > >> > --- > > > >> > fs/xattr.c | 1 + > > > >> > 1 file changed, 1 insertion(+) > > > >> > > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > > > Resending this as it appears that Stephen's original posting had a > > > > typo in the VFS mailing list. The original post can be found in the > > > > SELinux archives: > > > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > > > Hi, responding to this message since it has the correct lists. > > > > > > I just booted into a kernel with this patch applied and confirm that it > > > fixes the Gnulib tests that were failing. > > > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > > > Thanks for the fix. > > > > Al, Christian, are either of you going to pick up this fix to send to > > Linus? If not, any objection if I send this up? > > It's been in vfs.fixes for some time already and it'll go out with the > first round of post -rc1 fixes this week. Checking on the status of this patch as we are at -rc2 and I don't see it in Linus' tree? -- paul-moore.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-16 14:03 ` Paul Moore @ 2025-06-16 14:13 ` Christian Brauner 2025-06-17 0:27 ` Collin Funk 0 siblings, 1 reply; 12+ messages in thread From: Christian Brauner @ 2025-06-16 14:13 UTC (permalink / raw) To: Paul Moore Cc: linux-fsdevel, Alexander Viro, Collin Funk, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib On Mon, Jun 16, 2025 at 10:03:52AM -0400, Paul Moore wrote: > On Wed, Jun 11, 2025 at 6:05 AM Christian Brauner <brauner@kernel.org> wrote: > > On Tue, Jun 10, 2025 at 07:50:10PM -0400, Paul Moore wrote: > > > On Fri, Jun 6, 2025 at 1:39 AM Collin Funk <collin.funk1@gmail.com> wrote: > > > > Paul Moore <paul@paul-moore.com> writes: > > > > >> <stephen.smalley.work@gmail.com> wrote: > > > > >> > > > > > >> > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > > > > >> > include security.* xattrs") failed to reset err after the call to > > > > >> > security_inode_listsecurity(), which returns the length of the > > > > >> > returned xattr name. This results in simple_xattr_list() incorrectly > > > > >> > returning this length even if a POSIX acl is also set on the inode. > > > > >> > > > > > >> > Reported-by: Collin Funk <collin.funk1@gmail.com> > > > > >> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > > > > >> > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > > > > >> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > > > > >> > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > > > >> > > > > > >> > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > > > > >> > --- > > > > >> > fs/xattr.c | 1 + > > > > >> > 1 file changed, 1 insertion(+) > > > > >> > > > > >> Reviewed-by: Paul Moore <paul@paul-moore.com> > > > > > > > > > > Resending this as it appears that Stephen's original posting had a > > > > > typo in the VFS mailing list. The original post can be found in the > > > > > SELinux archives: > > > > > > > > > > https://lore.kernel.org/selinux/20250605164852.2016-1-stephen.smalley.work@gmail.com/ > > > > > > > > Hi, responding to this message since it has the correct lists. > > > > > > > > I just booted into a kernel with this patch applied and confirm that it > > > > fixes the Gnulib tests that were failing. > > > > > > > > Reviewed-by: Collin Funk <collin.funk1@gmail.com> > > > > Tested-by: Collin Funk <collin.funk1@gmail.com> > > > > > > > > Thanks for the fix. > > > > > > Al, Christian, are either of you going to pick up this fix to send to > > > Linus? If not, any objection if I send this up? > > > > It's been in vfs.fixes for some time already and it'll go out with the > > first round of post -rc1 fixes this week. > > Checking on the status of this patch as we are at -rc2 and I don't see > it in Linus' tree? Sent this morning with some other fixes. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-16 14:13 ` Christian Brauner @ 2025-06-17 0:27 ` Collin Funk 0 siblings, 0 replies; 12+ messages in thread From: Collin Funk @ 2025-06-17 0:27 UTC (permalink / raw) To: Christian Brauner Cc: Paul Moore, linux-fsdevel, Alexander Viro, Stephen Smalley, linux-kernel, selinux, eggert, bug-gnulib Christian Brauner <brauner@kernel.org> writes: >> Checking on the status of this patch as we are at -rc2 and I don't see >> it in Linus' tree? > > Sent this morning with some other fixes. I see it merged now [1]. Thanks for the help all. Collin [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe78e02600f83d81e55f6fc352d82c4f264a2901 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fs/xattr.c: fix simple_xattr_list() @ 2025-06-05 16:51 Stephen Smalley 2025-06-05 17:09 ` Collin Funk 0 siblings, 1 reply; 12+ messages in thread From: Stephen Smalley @ 2025-06-05 16:51 UTC (permalink / raw) To: linux-fsdevel; +Cc: Stephen Smalley, Collin Funk, Paul Eggert commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") failed to reset err after the call to security_inode_listsecurity(), which returns the length of the returned xattr name. This results in simple_xattr_list() incorrectly returning this length even if a POSIX acl is also set on the inode. Reported-by: Collin Funk <collin.funk1@gmail.com> Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ Reported-by: Paul Eggert <eggert@cs.ucla.edu> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> --- fs/xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/xattr.c b/fs/xattr.c index 8ec5b0204bfd..600ae97969cf 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -1479,6 +1479,7 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, buffer += err; } remaining_size -= err; + err = 0; read_lock(&xattrs->lock); for (rbp = rb_first(&xattrs->rb_root); rbp; rbp = rb_next(rbp)) { -- 2.49.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] fs/xattr.c: fix simple_xattr_list() 2025-06-05 16:51 Stephen Smalley @ 2025-06-05 17:09 ` Collin Funk 0 siblings, 0 replies; 12+ messages in thread From: Collin Funk @ 2025-06-05 17:09 UTC (permalink / raw) To: Stephen Smalley; +Cc: linux-fsdevel, Paul Eggert Stephen Smalley <stephen.smalley.work@gmail.com> writes: > commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always > include security.* xattrs") failed to reset err after the call to > security_inode_listsecurity(), which returns the length of the > returned xattr name. This results in simple_xattr_list() incorrectly > returning this length even if a POSIX acl is also set on the inode. > > Reported-by: Collin Funk <collin.funk1@gmail.com> > Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ > Reported-by: Paul Eggert <eggert@cs.ucla.edu> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 > Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") > > Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> > --- > fs/xattr.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/xattr.c b/fs/xattr.c > index 8ec5b0204bfd..600ae97969cf 100644 > --- a/fs/xattr.c > +++ b/fs/xattr.c > @@ -1479,6 +1479,7 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, > buffer += err; > } > remaining_size -= err; > + err = 0; > > read_lock(&xattrs->lock); > for (rbp = rb_first(&xattrs->rb_root); rbp; rbp = rb_next(rbp)) { Thanks for looking into it and the quick patch. I'll see if I can test it later today. Collin ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-06-17 0:27 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20250605164852.2016-1-stephen.smalley.work@gmail.com> [not found] ` <CAHC9VhQ-f-n+0g29MpBB3_om-e=vDqSC3h+Vn_XzpK2zpqamdQ@mail.gmail.com> 2025-06-05 21:51 ` [PATCH] fs/xattr.c: fix simple_xattr_list() Paul Moore 2025-06-06 5:39 ` Collin Funk 2025-06-10 23:50 ` Paul Moore 2025-06-11 10:05 ` Christian Brauner 2025-06-11 15:45 ` Paul Moore 2025-06-12 12:21 ` Christian Brauner 2025-06-12 12:54 ` Stephen Smalley 2025-06-16 14:03 ` Paul Moore 2025-06-16 14:13 ` Christian Brauner 2025-06-17 0:27 ` Collin Funk 2025-06-05 16:51 Stephen Smalley 2025-06-05 17:09 ` Collin Funk
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).