diff options
| author | Li RongQing <lirongqing@baidu.com> | 2026-10-08 11:15:33 +0800 |
|---|---|---|
| committer | John Johansen <john.johansen@canonical.com> | 2026-10-29 08:29:00 -0700 |
| commit | 7ccd884a5e5386f4c7d98625113f4924f70286b4 (patch) | |
| tree | bbec2cfa68fafe324e7f103934a78f64bbb52427 /scripts/Makefile.thinlto | |
| parent | 07aee062c6ecaa7199be583c83a1c74ae9885f03 (diff) | |
| download | linux-7ccd884a5e5386f4c7d98625113f4924f70286b4.tar.gz linux-7ccd884a5e5386f4c7d98625113f4924f70286b4.zip | |
apparmor: avoid potential double free when remapping DFA tables
When unpacking a DFA, aa_dfa_unpack() stores a table in dfa->tables
before attempting to remap a 16-bit table to 32-bit.
However, remap_data16_to_data32() frees the original table when
allocation of the new table fails. This leaves the corresponding
dfa->tables entry pointing to freed memory. If the unpacking then
fails, dfa_free() attempts to free the same table again.
Only publish the table to dfa->tables after any required remapping
has completed successfully, so that dfa->tables never contains a
pointer to a table that has already been freed.
Fixes: 9208c05f9fdf ("apparmor: add support for 2^24 states to the dfa state machine.")
Cc: stable@vger.kernel.org
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
