{"id":"CVE-2022-49978","published":"2025-06-18T11:00:40Z","modified":"2026-05-11T19:10:22Z","title":"fbdev: fb_pm2fb: Avoid potential divide by zero error","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nfbdev: fb_pm2fb: Avoid potential divide by zero error\n\nIn `do_fb_ioctl()` of fbmem.c, if cmd is FBIOPUT_VSCREENINFO, var will be\ncopied from user, then go through `fb_set_var()` and\n`info->fbops->fb_check_var()` which could may be `pm2fb_check_var()`.\nAlong the path, `var->pixclock` won't be modified. This function checks\nwhether reciprocal of `var->pixclock` is too high. If `var->pixclock` is\nzero, there will be a divide by zero error. So, it is necessary to check\nwhether denominator is zero to avoid crash. As this bug is found by\nSyzkaller, logs are listed below.\n\ndivide error in pm2fb_check_var\nCall Trace:\n <TASK>\n fb_set_var+0x367/0xeb0 drivers/video/fbdev/core/fbmem.c:1015\n do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1110\n fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1189","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00264,"percentile":0.18506,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/0f1174f4972ea9fad6becf8881d71adca8e9ca91","tags":[]},{"url":"https://git.kernel.org/stable/c/3ec326a6a0d4667585ca595f438c7293e5ced7c4","tags":[]},{"url":"https://git.kernel.org/stable/c/7f88cdfea8d7f4dbaf423d808241403b2bb945e4","tags":[]},{"url":"https://git.kernel.org/stable/c/7d9591b32a9092fc6391a316b56e8016c6181c3d","tags":[]},{"url":"https://git.kernel.org/stable/c/8fc778ee2fb2853f7a3531fa7273349640d8e4e9","tags":[]},{"url":"https://git.kernel.org/stable/c/34c3dea1189525cd533071ed5c176fc4ea8d982b","tags":[]},{"url":"https://git.kernel.org/stable/c/cb4bb011a683532841344ca7f281b5e04389b4f8","tags":[]},{"url":"https://git.kernel.org/stable/c/19f953e7435644b81332dd632ba1b2d80b1e37af","tags":[]}],"priority":{"score":3.7,"factors":[{"name":"EPSS percentile","points":3.7}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0f1174f4972ea9fad6becf8881d71adca8e9ca91",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3ec326a6a0d4667585ca595f438c7293e5ced7c4",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 7f88cdfea8d7f4dbaf423d808241403b2bb945e4",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 7d9591b32a9092fc6391a316b56e8016c6181c3d",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 8fc778ee2fb2853f7a3531fa7273349640d8e4e9",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 34c3dea1189525cd533071ed5c176fc4ea8d982b",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < cb4bb011a683532841344ca7f281b5e04389b4f8",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 19f953e7435644b81332dd632ba1b2d80b1e37af"]},{"vendor":"Linux","product":"Linux","versions":["2.6.12"]}],"euvd":{"id":"EUVD-2022-55258","exploited":false,"provenance":"source"}}