Commit ffeeaad
Al Viro
nfs: fix ->d_revalidate() UAF on ->d_name accesses
Pass the stable name all the way down to ->rpc_ops->lookup() instances.
Note that passing &dentry->d_name is safe in e.g. nfs_lookup() - it *is*
stable there, as it is in ->create() et.al.
dget_parent() in nfs_instantiate() should be redundant - it'd better be
stable there; if it's not, we have more trouble, since ->d_name would
also be unsafe in such case.
nfs_submount() and nfs4_submount() may or may not require fixes - if
they ever get moved on server with fhandle preserved, we are in trouble
there...
UAF window is fairly narrow here and exfiltration requires the ability
to watch the traffic.
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>1 parent 39f644a commit ffeeaad
File tree
6 files changed
+25
-24
lines changed- fs/nfs
- include/linux
6 files changed
+25
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | | - | |
| 1675 | + | |
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
| |||
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
1693 | | - | |
| 1693 | + | |
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
| |||
1775 | 1775 | | |
1776 | 1776 | | |
1777 | 1777 | | |
1778 | | - | |
| 1778 | + | |
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
| |||
1970 | 1970 | | |
1971 | 1971 | | |
1972 | 1972 | | |
1973 | | - | |
| 1973 | + | |
| 1974 | + | |
1974 | 1975 | | |
1975 | 1976 | | |
1976 | 1977 | | |
| |||
2246 | 2247 | | |
2247 | 2248 | | |
2248 | 2249 | | |
2249 | | - | |
| 2250 | + | |
2250 | 2251 | | |
2251 | 2252 | | |
2252 | 2253 | | |
| |||
2305 | 2306 | | |
2306 | 2307 | | |
2307 | 2308 | | |
2308 | | - | |
| 2309 | + | |
| 2310 | + | |
2309 | 2311 | | |
2310 | 2312 | | |
2311 | 2313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4536 | 4536 | | |
4537 | 4537 | | |
4538 | 4538 | | |
4539 | | - | |
4540 | | - | |
| 4539 | + | |
| 4540 | + | |
4541 | 4541 | | |
4542 | 4542 | | |
4543 | 4543 | | |
4544 | 4544 | | |
4545 | 4545 | | |
4546 | 4546 | | |
4547 | | - | |
| 4547 | + | |
4548 | 4548 | | |
4549 | 4549 | | |
4550 | 4550 | | |
| |||
4586 | 4586 | | |
4587 | 4587 | | |
4588 | 4588 | | |
4589 | | - | |
4590 | | - | |
| 4589 | + | |
| 4590 | + | |
4591 | 4591 | | |
4592 | 4592 | | |
4593 | 4593 | | |
4594 | 4594 | | |
4595 | 4595 | | |
4596 | | - | |
4597 | 4596 | | |
4598 | 4597 | | |
4599 | | - | |
| 4598 | + | |
4600 | 4599 | | |
4601 | 4600 | | |
4602 | 4601 | | |
| |||
4631 | 4630 | | |
4632 | 4631 | | |
4633 | 4632 | | |
4634 | | - | |
| 4633 | + | |
4635 | 4634 | | |
4636 | 4635 | | |
4637 | 4636 | | |
4638 | 4637 | | |
4639 | 4638 | | |
4640 | | - | |
| 4639 | + | |
4641 | 4640 | | |
4642 | 4641 | | |
4643 | 4642 | | |
| |||
4652 | 4651 | | |
4653 | 4652 | | |
4654 | 4653 | | |
4655 | | - | |
| 4654 | + | |
| 4655 | + | |
4656 | 4656 | | |
4657 | 4657 | | |
4658 | 4658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
| 161 | + | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
1788 | | - | |
| 1788 | + | |
1789 | 1789 | | |
1790 | 1790 | | |
1791 | 1791 | | |
| |||
0 commit comments