An issue was discovered in drivers/mtd/ubi/cdev.c in the Linux kernel 6.2. There is a divide-by-zero error in dodiv(sz,mtd->erasesize), used indirectly by ctrlcdev_ioctl, when mtd->erasesize is 0.
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-31085.json"
[
{
"id": "CVE-2023-31085-f792c042",
"signature_type": "Function",
"digest": {
"function_hash": "192177927025339300459739027336313458685",
"length": 5492.0
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@017c73a34a661a861712f7cc1393a123e5b2208c",
"target": {
"function": "ubi_attach_mtd_dev",
"file": "drivers/mtd/ubi/build.c"
},
"deprecated": false
}
]