Commit 053fc4f
Al Viro
fuse: fix UAF in rcu pathwalks
->permission(), ->get_link() and ->inode_get_acl() might dereference
->s_fs_info (and, in case of ->permission(), ->s_fs_info->fc->user_ns
as well) when called from rcu pathwalk.
Freeing ->s_fs_info->fc is rcu-delayed; we need to make freeing ->s_fs_info
and dropping ->user_ns rcu-delayed too.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent e31f0a5 commit 053fc4f
3 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
478 | | - | |
| 477 | + | |
479 | 478 | | |
480 | 479 | | |
481 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
891 | 892 | | |
892 | 893 | | |
893 | 894 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
933 | 941 | | |
934 | 942 | | |
935 | 943 | | |
| |||
941 | 949 | | |
942 | 950 | | |
943 | 951 | | |
944 | | - | |
945 | 952 | | |
946 | 953 | | |
947 | 954 | | |
948 | 955 | | |
949 | 956 | | |
950 | | - | |
| 957 | + | |
951 | 958 | | |
952 | 959 | | |
953 | 960 | | |
| |||
1366 | 1373 | | |
1367 | 1374 | | |
1368 | 1375 | | |
1369 | | - | |
| 1376 | + | |
1370 | 1377 | | |
1371 | 1378 | | |
1372 | 1379 | | |
| |||
1902 | 1909 | | |
1903 | 1910 | | |
1904 | 1911 | | |
1905 | | - | |
| 1912 | + | |
1906 | 1913 | | |
1907 | 1914 | | |
1908 | 1915 | | |
| |||
0 commit comments