{"id":72749,"date":"2025-10-31T13:45:50","date_gmt":"2025-10-31T10:15:50","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-40106-comedi-fix-divide-by-zero-in-comedi_buf_munge\/"},"modified":"2025-10-31T13:45:50","modified_gmt":"2025-10-31T10:15:50","slug":"cve-2025-40106-comedi-fix-divide-by-zero-in-comedi_buf_munge","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-40106-comedi-fix-divide-by-zero-in-comedi_buf_munge\/","title":{"rendered":"CVE-2025-40106 &#8211; comedi: fix divide-by-zero in comedi_buf_munge()"},"content":{"rendered":"<p>CVE ID : CVE-2025-40106<\/p>\n<p>Published :  Oct. 31, 2025, 10:15 a.m. | 1\u00a0hour, 11\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>comedi: fix divide-by-zero in comedi_buf_munge()<\/p>\n<p>The comedi_buf_munge() function performs a modulo operation<br \/>\n`async-&gt;munge_chan %= async-&gt;cmd.chanlist_len` without first<br \/>\nchecking if chanlist_len is zero. If a user program submits a command with<br \/>\nchanlist_len set to zero, this causes a divide-by-zero error when the device<br \/>\nprocesses data in the interrupt handler path.<\/p>\n<p>Add a check for zero chanlist_len at the beginning of the<br \/>\nfunction, similar to the existing checks for !map and<br \/>\nCMDF_RAWDATA flag. When chanlist_len is zero, update<br \/>\nmunge_count and return early, indicating the data was<br \/>\nhandled without munging.<\/p>\n<p>This prevents potential kernel panics from malformed user commands.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-40106 Published : Oct. 31, 2025, 10:15 a.m. | 1\u00a0hour, 11\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: comedi: fix divide-by-zero in comedi_buf_munge() The comedi_buf_munge() function performs a modulo operation `async-&gt;munge_chan %= async-&gt;cmd.chanlist_len` without first checking if chanlist_len is zero. If a user program submits a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-72749","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=72749"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72749\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=72749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=72749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=72749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}