Skip to content

Conversation

@stevegrubb
Copy link
Contributor

See individual commits for descriptions.

ausearch_load_interpretations() directly calls
_auparse_load_interpretations(au, n->interp) but au is a global
pointer initialized only when CSV/TEXT output is selected. When
using the -i option (interpreted output) au remains NULL, leading
to a crash in free_interpretation_list().
There were identical stub declarations in various files. This patch
gathers them all up to make future maintenance easier.
path_norm uses a static array working to build paths and then returns a
copy. Concurrent calls may corrupt working before the copy is made.
Now it dynamically allocates a PATH_MAX-sized buffer, handles cleanup
on all return paths, and frees it before duplicating the final normalized
path.
interpret.c maintains global caches (uid_cache, gid_cache) without
synchronization, meaning concurrent lookups from multiple threads
could race. Calls such as _auparse_flush_caches() operate on these
globals, further suggesting they are shared process wide.

Move the caches into the auparse_state_t variable so that the cache
is private to the auparse_state_t instance.
NEVER_LOADED is defined both in interpret.h and in the stub header.
Move it to a shared location.
@stevegrubb stevegrubb merged commit 27d9db5 into linux-audit:master Jun 21, 2025
0 of 4 checks passed
@stevegrubb stevegrubb deleted the auparse branch June 21, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant