summaryrefslogtreecommitdiffstats
path: root/lib/show_mem.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-09-29 15:48:10 +0200
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 23:49:04 +0200
commita2f31df06b7aa1769f12ec6f9ae7f18e78582cad (patch)
tree64e36b139b1621471e8a958ae813e8a6ccb4acf5 /lib/show_mem.c
parentapparmor: Fix undefined references to zstd_ symbols (diff)
downloadlinux-a2f31df06b7aa1769f12ec6f9ae7f18e78582cad.tar.xz
linux-a2f31df06b7aa1769f12ec6f9ae7f18e78582cad.zip
apparmor: Fix decompression of rawdata for read back to userspace
The rawdata readback has a few of problems. First if compression is enabled when the data is read then the compressed data is read out instead decompressing the data. Second if compression of the data fails, the code does not handle holding onto the raw_data in uncompressed form. Third if the compression is enabled/disabled after the rawdata was loaded, the check against the global control of whether to use compression does not reflect what was already done to the data. Fix these by always storing the compressed size, along with the original data size even if compression fails or is not used. And use this to detect whether the rawdata is actually compressed. Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data") Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Jon Tourville <jon.tourville@canonical.com>
Diffstat (limited to 'lib/show_mem.c')
0 files changed, 0 insertions, 0 deletions