selinux/libsepol
James Carter 90db06c524 libsepol: Use a dynamic buffer in sepol_av_to_string()
In the internal function sepol_av_to_string(), use a dynamically
allocated buffer for the permission names of an access vector instead
of a fixed static buffer to support very long permission names.

Update the internal users of sepol_av_to_string() to free the buffer.

The exported function sepol_perm_to_string() is just a wrapper to
the internal function. To avoid changing the behavior of this function,
use a static buffer and copy the resulting string from the internal
function. If the string is too long for the buffer or there was an
error in creating the string, return a string indicating the error.

All of the changes to the internal function and users was the work
of Christian Göttsche <cgzones@googlemail.com>.

Reported-by: oss-fuzz (issue 64832, 64933)
Suggested-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: James Carter <jwcart2@gmail.com>
2024-03-04 09:45:41 -05:00
..
cil libsepol/cil: Clear AST node after destroying bad filecon rule 2023-12-12 10:26:39 -05:00
fuzz libsepol/fuzz: handle empty and non kernel policies 2023-12-06 13:32:50 -05:00
include libsepol: Use a dynamic buffer in sepol_av_to_string() 2024-03-04 09:45:41 -05:00
man Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
src libsepol: Use a dynamic buffer in sepol_av_to_string() 2024-03-04 09:45:41 -05:00
tests libsepol/tests: Update the order of neverallow test results 2023-11-21 08:55:45 -05:00
utils libsepol/utils: improve wording 2022-07-06 15:57:24 -04:00
.gitignore libsepol: add policy utilities 2022-04-12 13:09:19 -04:00
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Update VERSIONs to 3.6 for release. 2023-12-13 15:46:22 +01:00