[PATCH -next 3/9] lockdown: bound the status string with scnprintf

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 3 07:54:20 UTC 2026


> Use scnprintf() instead of sprintf() when composing the lockdown status
> string in lockdown_read().  The current set of levels fits well within the
> 80 byte buffer, but sprintf() provides no protection if more or longer
> labels are added later.  scnprintf() makes the buffer bounds explicit.
> 
> Signed-off-by: Cai Xinchen <caixinchen1 at huawei.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103082421.3033195-1-caixinchen1@huawei.com?part=3




More information about the Linux-security-module-archive mailing list