Commit 550f7ca
ceph: give up on paths longer than PATH_MAX
If the full path to be built by ceph_mdsc_build_path() happens to be
longer than PATH_MAX, then this function will enter an endless (retry)
loop, effectively blocking the whole task. Most of the machine
becomes unusable, making this a very simple and effective DoS
vulnerability.
I cannot imagine why this retry was ever implemented, but it seems
rather useless and harmful to me. Let's remove it and fail with
ENAMETOOLONG instead.
Cc: [email protected]
Reported-by: Dario Weißer <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Reviewed-by: Alex Markuze <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>1 parent d6fd6f8 commit 550f7ca
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2800 | 2800 | | |
2801 | 2801 | | |
2802 | 2802 | | |
2803 | | - | |
2804 | | - | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
2805 | 2806 | | |
2806 | | - | |
2807 | | - | |
2808 | | - | |
| 2807 | + | |
2809 | 2808 | | |
2810 | 2809 | | |
2811 | 2810 | | |
| |||
0 commit comments