[PR #815] [MERGED] CVE-2016-7545 fix improvement #3761

Closed
opened 2026-05-05 10:07:25 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/815
Author: @manevich
Created: 9/26/2016
Status: Merged
Merged: 9/26/2016
Merged by: @netblue30

Base: masterHead: CVE-2016-7545_try2


📝 Commits (1)

📊 Changes

2 files changed (+32 additions, -3 deletions)

View changed files

📝 src/firejail/main.c (+11 -1)
📝 src/firejail/sandbox.c (+21 -2)

📄 Description

Improved your fix a bit: it's better to flush /dev/tty than stdin, as stdin descriptor may be redirected to something else.
Test program

#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <fcntl.h>

int main()
{
    char *cmd = "ls /proc\n";
    while(*cmd)
     ioctl(1, TIOCSTI, cmd++);

     return 0;
}

and command
firejail ./CVE-2016-7545 </dev/null


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/815 **Author:** [@manevich](https://github.com/manevich) **Created:** 9/26/2016 **Status:** ✅ Merged **Merged:** 9/26/2016 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `CVE-2016-7545_try2` --- ### 📝 Commits (1) - [`bde9fae`](https://github.com/netblue30/firejail/commit/bde9fae007dd3c4b802c1652a7d7cbabf0aec237) CVE-2016-7545 ### 📊 Changes **2 files changed** (+32 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/main.c` (+11 -1) 📝 `src/firejail/sandbox.c` (+21 -2) </details> ### 📄 Description Improved your fix a bit: it's better to flush `/dev/tty` than `stdin`, as `stdin` descriptor may be redirected to something else. Test program ``` c #include <unistd.h> #include <sys/ioctl.h> #include <termios.h> #include <fcntl.h> int main() { char *cmd = "ls /proc\n"; while(*cmd) ioctl(1, TIOCSTI, cmd++); return 0; } ``` and command `firejail ./CVE-2016-7545 </dev/null` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:07:25 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3761
No description provided.