mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #5613] [MERGED] modif: Escape control characters of the command line #5571
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#5571
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/5613
Author: @layderv
Created: 1/22/2023
Status: ✅ Merged
Merged: 2/14/2023
Merged by: @netblue30
Base:
master← Head:escape-cntrl-sequences📝 Commits (2)
ab4bd9cEscape control characters74e9445Style changes📊 Changes
3 files changed (+74 additions, -1 deletions)
View changed files
📝
src/include/common.h(+1 -0)📝
src/lib/common.c(+58 -0)📝
src/lib/pid.c(+15 -1)📄 Description
Names and commands can contain control characters:
results in "Text" printed in red.
Prevent commands like
--treeto control the terminal.I've tested some control characters and I can't do worse than making jails disappear from
--tree(by controlling the cursor) and possibly output anything to console (hijacking a console output). Reading various documentations and forums, I didn't find interesting control characters like "writing to file" or "execute command", that resulted in CVEs in the past.print_elemis the one used in--tree.if (iscntrl(*c)) {, if the*ccharacter is not one in theswitch, the character is discarded. Is this the behavior you want, or do you prefer to allow that character?Before submitting this PR, I contacted @netblue30.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.