gfs2: Switch from strlcpy to strscpy
stable inclusion from stable-v5.10.156 commit a5da76df467a55071c88c7e2612250e91034e4d7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5da76df467a55071c88c7e2612250e91034e4d7 -------------------------------- commit 204c0300 upstream. Switch from strlcpy to strscpy and make sure that @count is the size of the smaller of the source and destination buffers. This prevents reading beyond the end of the source buffer when the source string isn't null terminated. Found by a modified version of syzkaller. Suggested-by:Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by:
Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment