Commit 8b94775
Revert "xattr: switch to CLASS(fd)"
This reverts commit 5a1e865e51063d6c56f673ec8ad4b6604321b455 which is
commit a718743 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 <spender@grsecurity.net>
Closes: https://x.com/spendergrsec/status/2040049852793450561
Cc: Alva Lan <alvalan9@foxmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tomasz Kramkowski <tomasz@kramkow.ski>
Tested-by: Barry K. Nathan <barryn@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 16d41d32b7c76f547f98932f2d1e4b6ae2c0666c)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent a2f6f01 commit 8b94775
1 file changed
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
707 | 709 | | |
708 | 710 | | |
709 | 711 | | |
| |||
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | | - | |
| 819 | + | |
| 820 | + | |
818 | 821 | | |
| 822 | + | |
| 823 | + | |
819 | 824 | | |
820 | | - | |
| 825 | + | |
821 | 826 | | |
| 827 | + | |
| 828 | + | |
822 | 829 | | |
823 | 830 | | |
824 | 831 | | |
| |||
885 | 892 | | |
886 | 893 | | |
887 | 894 | | |
888 | | - | |
| 895 | + | |
| 896 | + | |
889 | 897 | | |
| 898 | + | |
| 899 | + | |
890 | 900 | | |
891 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
892 | 904 | | |
893 | 905 | | |
894 | 906 | | |
| |||
951 | 963 | | |
952 | 964 | | |
953 | 965 | | |
954 | | - | |
| 966 | + | |
955 | 967 | | |
956 | | - | |
| 968 | + | |
957 | 969 | | |
| 970 | + | |
| 971 | + | |
958 | 972 | | |
959 | 973 | | |
960 | 974 | | |
| |||
969 | 983 | | |
970 | 984 | | |
971 | 985 | | |
| 986 | + | |
972 | 987 | | |
973 | 988 | | |
974 | 989 | | |
| |||
0 commit comments