mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4274] gcc -fanalyzer warnings (GCC 11) #2602
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#2602
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?
Originally created by @rusty-snake on GitHub (May 13, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4274
full log
ls.c:273:16: warning: leak of ‘strdup(path)’ [CWE-401] [-Wanalyzer-malloc-leak]profile.c:239:28: warning: leak of ‘ptr’ [CWE-401] [-Wanalyzer-malloc-leak]restricted_shell.c:123:42: warning: leak of ‘strdup(ptr)’ [CWE-401] [-Wanalyzer-malloc-leak]0783f9f9ffsbox.c:254:24: warning: dereference of possibly-NULL ‘arg’ [CWE-690] [-Wanalyzer-possible-null-dereference]0783f9f9ffsbox.c:255:16: warning: dereference of possibly-NULL ‘arg’ [CWE-690] [-Wanalyzer-possible-null-dereference57c0c21e09firemon.c:55:9: warning: call to ‘exit’ from within signal handler [CWE-479] [-Wanalyzer-unsafe-call-within-signal-handler]../include/common.h:39:28: warning: leak of ‘dname’ [CWE-401] [-Wanalyzer-malloc-leak]All these warings make it impossible ATM to
makeafter./configurewith--enable-analyzerand--enable-fatal-warnings.@reinerh commented on GitHub (May 13, 2021):
Interesting, these have not been caught by clang-analyzer (scan-build).
When these are fixed we should enable it in CI.
Edit: just noticed it is already enabled in CI (build_and_test job).
@reinerh commented on GitHub (May 13, 2021):
Ah, these warnings seem to be newly detected with GCC 11. It builds fine here with GCC 10.
@smitsohu commented on GitHub (May 16, 2021):
Is it only me? My impression is that
-Wanalyzer-malloc-leakwarnings are still prone to false positives. At first glance only the second memleak (profile.c) looks real.If there is no way to silence these warnings individually, would it be ok to disable them altogether for the time being?
@reinerh commented on GitHub (May 16, 2021):
@smitsohu I have the same impression. A few days ago I tried to tackle the problem in
ls.c, and I was able to "silence" it with this change:Though both calls obviously allocate memory...
@ghost commented on GitHub (May 20, 2021):
Are the recent CI build failures like this one for example related to -fanalyzer? If so I'd like to +1 @smitsohu's suggestion.
@reinerh commented on GitHub (May 20, 2021):
@glitsj16 Yes, it's a -fanalyzer regression:
@reinerh commented on GitHub (May 23, 2021):
The recent CI failures are false positives in GCC 10 and no longer appear in GCC 11 (see #4297).