[PR #4652] [MERGED] Fix TOCTOU/CodeQL CWE-367 warnings (easy ones + fs.c) #5216

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/4652
Author: @kmk3
Created: 10/29/2021
Status: Merged
Merged: 11/11/2021
Merged by: @netblue30

Base: masterHead: fix-toctou-easy


📝 Commits (2)

  • 908f8ad Fix TOCTOU/CodeQL CWE-367 warnings (easy ones)
  • ddb828b fs.c: Fix TOCTOU/CodeQL CWE-367 warning

📊 Changes

3 files changed (+38 additions, -30 deletions)

View changed files

📝 src/fids/main.c (+13 -6)
📝 src/firejail/fs.c (+22 -21)
📝 src/firejail/seccomp.c (+3 -3)

📄 Description

This should fix all such warnings on the following files:

  • src/fids/main.c
  • src/firejail/seccomp.c

Misc: Besides the above reason, these are some of the more
straightforward TOCTOU warning fixes and they are done without any
additional refactor commits, so that's the reason for "easy ones".

List of TOCTOU warnings:
https://github.com/netblue30/firejail/security/code-scanning?query=id%3Acpp%2Ftoctou-race-condition

See https://cwe.mitre.org/data/definitions/367.html

Relates to #4503.


🔄 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/4652 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 10/29/2021 **Status:** ✅ Merged **Merged:** 11/11/2021 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `fix-toctou-easy` --- ### 📝 Commits (2) - [`908f8ad`](https://github.com/netblue30/firejail/commit/908f8ad914b06304e06f796adda0c641a889ed47) Fix TOCTOU/CodeQL CWE-367 warnings (easy ones) - [`ddb828b`](https://github.com/netblue30/firejail/commit/ddb828be0716972bc98f3470811420ba60bb9666) fs.c: Fix TOCTOU/CodeQL CWE-367 warning ### 📊 Changes **3 files changed** (+38 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `src/fids/main.c` (+13 -6) 📝 `src/firejail/fs.c` (+22 -21) 📝 `src/firejail/seccomp.c` (+3 -3) </details> ### 📄 Description This should fix all such warnings on the following files: * src/fids/main.c * src/firejail/seccomp.c Misc: Besides the above reason, these are some of the more straightforward TOCTOU warning fixes and they are done without any additional refactor commits, so that's the reason for "easy ones". List of TOCTOU warnings: https://github.com/netblue30/firejail/security/code-scanning?query=id%3Acpp%2Ftoctou-race-condition See https://cwe.mitre.org/data/definitions/367.html Relates to #4503. --- <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:34:22 -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#5216
No description provided.