mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
b862e561ba
Zero-length security labels are invalid but kernel should handle them. This patch fixes kernel panic after setting zero-length security labels: # attr -S -s "SMACK64" -V "" file And after writing zero-length string into smackfs files syslog and onlycp: # python -c 'import os; os.write(1, "")' > /smack/syslog The problem is caused by brain-damaged logic in function smk_parse_smack() which takes pointer to buffer and its length but if length below or equal zero it thinks that the buffer is zero-terminated. Unfortunately callers of this function are widely used and proper fix requires serious refactoring. Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
smack_access.c | ||
smack_lsm.c | ||
smack.h | ||
smackfs.c |