summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/coredump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index a64b87878ab3..8437bdc26d08 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -1418,6 +1418,10 @@ static inline bool check_coredump_socket(void)
if (strlen(p) >= UNIX_PATH_MAX)
return false;
+ /* Must not contain ".." in the path. */
+ if (name_contains_dotdot(core_pattern))
+ return false;
+
return true;
}