{"id":"CVE-2023-31085","title":"An issue was discovered in drivers/mtd/ubi/cdev.c in the Linux kernel 6.2","summary":"An issue was discovered in drivers/mtd/ubi/cdev.c in the Linux kernel 6.2. There is a divide-by-zero error in do_div(sz,mtd->erasesize), used indirectly by ctrl_cdev_ioctl, when mtd->erasesize is 0.","severity":"medium","cvss":5.5,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-369"],"vendor":"linux","product":"linux_kernel","affected":["linux_kernel = 6.2"],"published":"2023-04-24","updated":"2026-10-14","sourceUpdated":"2026-10-14T23:17:18.580","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-31085","references":[{"url":"https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=017c73a34a661a861712f7cc1393a123e5b2208c","label":"cve@mitre.org"},{"url":"https://lore.kernel.org/all/687864524.118195.1681799447034.JavaMail.zimbra%40nod.at/","label":"cve@mitre.org"},{"url":"https://security.netapp.com/advisory/ntap-20230929-0003/","label":"cve@mitre.org"},{"url":"https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=017c73a34a661a861712f7cc1393a123e5b2208c","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lore.kernel.org/all/687864524.118195.1681799447034.JavaMail.zimbra%40nod.at/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.netapp.com/advisory/ntap-20230929-0003/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-769027.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-794697.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"}],"tags":["nvd","cve.org"],"epss":0.00381,"epssPercentile":0.31877,"ingestedAt":"2026-10-15T00:02:07.132Z","slug":"CVE-2023-31085","body":"## Overview\n\nAn issue was discovered in drivers/mtd/ubi/cdev.c in the Linux kernel 6.2. There is a divide-by-zero error in do_div(sz,mtd->erasesize), used indirectly by ctrl_cdev_ioctl, when mtd->erasesize is 0.\n\n## Affected\n\n- `linux_kernel = 6.2`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":30,"depthScoreParts":{"impact":30.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}