-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/ccn-lite: Fix use after free bug [backport 2022.10] #18897
pkg/ccn-lite: Fix use after free bug [backport 2022.10] #18897
Conversation
TODO: Wait for #18896 to be rebased and merged, then rebase and enable build again. |
This fixes compilation with GCC >= 12.x, which is unhappy about the use after free: /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c: In function 'ccnl_fib_rem_entry': /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:916:16: error: pointer 'fwd' used after 'free' [-Werror=use-after-free] 916 | if (fwd->face) { | ~~~^~~~~~ In file included from /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:33: /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/../ccnl-riot/include/ccn-lite-riot.h:52:41: note: call to 'free' here 52 | #define ccnl_free(p) free(p) | ^~~~~~~ /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:910:13: note: in expansion of macro 'ccnl_free' 910 | ccnl_free(fwd); | ^~~~~~~~~ /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c: In function 'ccnl_fib_rem_entry': /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:916:16: error: pointer 'fwd' used after 'free' [-Werror=use-after-free] 916 | if (fwd->face) { | ~~~^~~~~~ In file included from /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:33: /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-riot/include/ccn-lite-riot.h:52:41: note: call to free' here 52 | #define ccnl_free(p) free(p) | ^~~~~~~ /home/maribu/Repos/software/RIOT/build/pkg/ccn-lite/src/ccnl-core/src/ccnl-relay.c:910:13: note: in expansion of macro 'ccnl_free' 910 | ccnl_free(fwd); | ^~~~~~~~~ (cherry picked from commit d605b58)
6a8ce2c
to
c28b70b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Murdock results✔️ PASSED c28b70b pkg/ccn-lite: Fix use after free bug
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
Backport of #18890
Contribution description
This fixes compilation with GCC >= 12.x, which is unhappy about the use after free:
Testing procedure
Let's be honest: This has been unmaintained and untested for years.
Issues/PRs references
Upstream PR: cn-uofbasel/ccn-lite#389