Author: Tomasz Kramkowski <[email protected]>
Date: Sun Apr 5 12:45:04 2026 +0100
Revert "xattr: switch to CLASS(fd)"
This reverts commit 5a1e865e51063d6c56f673ec8ad4b6604321b455 which is
commit a71874379ec8c6e788a61d71b3ad014a8d9a5c08 upstream.
A backporting mistake erroneously removed file descriptor checks for
`fgetxattr`, `flistxattr`, `fremovexattr`, and `fsetxattr` which lead to
kernel panics when those functions were called from userspace with a
file descriptor which did not reference an open file.
Reported-by: Brad Spengler <[email protected]>
Closes: https://x.com/spendergrsec/status/2040049852793450561
Cc: Alva Lan <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Tomasz Kramkowski <[email protected]>
Tested-by: Barry K. Nathan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>