mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #6958] [CLOSED] bugfix: correct directory traversal checking logic #6246
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#6246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/6958
Author: @JohnyTheCarrot
Created: 11/6/2025
Status: ❌ Closed
Base:
master← Head:fix/dir-traversal-check📝 Commits (1)
1552f7cbugfix: correct directory traversal checking logic📊 Changes
16 files changed (+48 additions, -23 deletions)
View changed files
📝
src/firecfg/main.c(+1 -1)📝
src/firejail/fs_bin.c(+2 -2)📝
src/firejail/fs_etc.c(+1 -1)📝
src/firejail/fs_home.c(+1 -1)📝
src/firejail/fs_lib.c(+2 -2)📝
src/firejail/fs_whitelist.c(+1 -1)📝
src/firejail/main.c(+7 -7)📝
src/firejail/netfilter.c(+1 -1)📝
src/firejail/netns.c(+1 -1)📝
src/firejail/output.c(+1 -1)📝
src/firejail/profile.c(+4 -3)📝
src/ftee/Makefile(+3 -0)📝
src/ftee/main.c(+1 -1)📝
src/include/common.h(+1 -0)📝
src/lib/common.c(+19 -0)📝
src/libtracelog/libtracelog.c(+2 -1)📄 Description
Fixes #6915
The logic checking for the presence of directory traversal 'tokens' yields false positives.
It is perhaps rare though entirely valid for a filename to contain a double dot.
The linked issue is how it manifested in my usage of Firejail.
I aim to fix this by checking any of the following instead:
if I am missing any scenarios in which a '..' would ordinarily be valid, please let me know.
PS: should I add
str_ends_withto the common.h header? I figure it couldn't hurt, no? Let me know.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.