“09296ee274a246acdeb7c4dbb9d96da0ed3c98b2”上不存在“...native/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 fc34eb68 编写于 作者: H Hyunwoo Kim 提交者: Zheng Zengkai

video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write

mainline inclusion
from mainline-5.19-rc4
commit a09d2d00
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5PRMO
CVE: CVE-2022-39842

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7

--------------------------------

In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of
type int.  Then, copy_from_user() may cause a heap overflow because it is used
as the third argument of copy_from_user().
Signed-off-by: NHyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: NHelge Deller <deller@gmx.de>
Signed-off-by: Nhuhai <huhai@kylinos.cn>
上级 17e07b09
...@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff, ...@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff,
struct pxa3xx_gcu_batch *buffer; struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file); struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4; size_t words = count / 4;
/* Does not need to be atomic. There's a lock in user space, /* Does not need to be atomic. There's a lock in user space,
* but anyhow, this is just for statistics. */ * but anyhow, this is just for statistics. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册