fbdev: fix potential OOB read in fast_imageblit()
stable inclusion from stable-v5.10.193 commit 570f52137e9ae94e74635e389f20842f484f6416 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9399M Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=570f52137e9ae94e74635e389f20842f484f6416 -------------------------------- [ Upstream commit c2d22806 ] There is a potential OOB read at fast_imageblit, for "colortab[(*src >> 4)]" can become a negative value due to "const char *s = image->data, *src". This change makes sure the index for colortab always positive or zero. Similar commit: https://patchwork.kernel.org/patch/11746067 Potential bug report: https://groups.google.com/g/syzkaller-bugs/c/9ubBXKeKXf4/m/k-QXy4UgAAAJ Signed-off-by:Zhang Shurong <zhang_shurong@foxmail.com> Cc: stable@vger.kernel.org Signed-off-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment