{"id":"CVE-2025-68308","aliases":["CVE-2025-68308"],"related":[],"kind":"vulnerability","state":"published","title":"can: kvaser_usb: leaf: Fix potential infinite loop in command parsers","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: kvaser_usb: leaf: Fix potential infinite loop in command parsers\n\nThe `kvaser_usb_leaf_wait_cmd()` and `kvaser_usb_leaf_read_bulk_callback`\nfunctions contain logic to zero-length commands. These commands are used\nto align data to the USB endpoint's wMaxPacketSize boundary.\n\nThe driver attempts to skip these placeholders by aligning the buffer\nposition `pos` to the next packet boundary using `round_up()` function.\n\nHowever, if zero-length command is found exactly on a packet boundary\n(i.e., `pos` is a multiple of wMaxPacketSize, including 0), `round_up`\nfunction will return the unchanged value of `pos`. This prevents `pos`\nto be increased, causing an infinite loop in the parsing logic.\n\nThis patch fixes this in the function by using `pos + 1` instead.\nThis ensures that even if `pos` is on a boundary, the calculation is\nbased on `pos + 1`, forcing `round_up()` to always return the next\naligned boundary.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: kvaser_usb: leaf: Fix potential infinite loop in command parsers\n\nThe `kvaser_usb_leaf_wait_cmd()` and `kvaser_usb_leaf_read_bulk_callback`\nfunctions contain logic to zero-length commands. These commands are used\nto align data to the USB endpoint's wMaxPacketSize boundary.\n\nThe driver attempts to skip these placeholders by aligning the buffer\nposition `pos` to the next packet boundary using `round_up()` function.\n\nHowever, if zero-length command is found exactly on a packet boundary\n(i.e., `pos` is a multiple of wMaxPacketSize, including 0), `round_up`\nfunction will return the unchanged value of `pos`. This prevents `pos`\nto be increased, causing an infinite loop in the parsing logic.\n\nThis patch fixes this in the function by using `pos + 1` instead.\nThis ensures that even if `pos` is on a boundary, the calculation is\nbased on `pos + 1`, forcing `round_up()` to always return the next\naligned boundary.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncan: kvaser_usb: leaf: Corrección de un posible bucle infinito en los analizadores de comandos\n\nLas funciones 'kvaser_usb_leaf_wait_cmd()' y 'kvaser_usb_leaf_read_bulk_callback' contienen lógica para comandos de longitud cero. Estos comandos se utilizan para alinear datos al límite wMaxPacketSize del punto final USB.\n\nEl controlador intenta omitir estos marcadores de posición alineando la posición del búfer 'pos' al siguiente límite de paquete utilizando la función 'round_up()'.\n\nSin embargo, si se encuentra un comando de longitud cero exactamente en un límite de paquete (es decir, 'pos' es un múltiplo de wMaxPacketSize, incluyendo 0), la función 'round_up' devolverá el valor sin cambios de 'pos'. Esto evita que 'pos' se incremente, causando un bucle infinito en la lógica de análisis.\n\nEste parche corrige esto en la función utilizando 'pos + 1' en su lugar. Esto asegura que, incluso si 'pos' está en un límite, el cálculo se base en 'pos + 1', forzando a 'round_up()' a devolver siempre el siguiente límite alineado.","source":"nvd"}],"published":"2025-12-16T15:06:25.081Z","modified":"2026-10-14T16:10:00.250Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"58343e0a4d43699f0e2f5b169384bbe4c0217add","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"69c7825df64e24dc15d31631a1fc9145324b1345","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"028e89c7e8b4346302e88df01cc50e0a1f05791a","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"e9dd83a75a7274edef21682c823bf0b66d7b6b7f","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"0897cea266e39166a36111059ba147192b36592f","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"bd8135a560cf6e64f0b98ed4daadf126a38f7f48","status":"affected"},{"type":"git","introduced":"7259124eac7d1b76b41c7a9cb2511a30556deebe","fixed":"0c73772cd2b8cc108d5f5334de89ad648d89b9ec","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.19","status":"unaffected"},{"type":"semver","introduced":"5.10.247","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.197","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.159","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.119","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.61","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.11","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/58343e0a4d43699f0e2f5b169384bbe4c0217add","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69c7825df64e24dc15d31631a1fc9145324b1345","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/028e89c7e8b4346302e88df01cc50e0a1f05791a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e9dd83a75a7274edef21682c823bf0b66d7b6b7f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0897cea266e39166a36111059ba147192b36592f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bd8135a560cf6e64f0b98ed4daadf126a38f7f48","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0c73772cd2b8cc108d5f5334de89ad648d89b9ec","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68308","url":"https://www.cve.org/CVERecord?id=CVE-2025-68308","licence":"CVE Terms of Use","modified":"2026-05-11T21:50:39.573Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68308","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68308","licence":"Public domain","modified":"2026-10-14T16:10:00.250Z"}],"updatedAt":"2026-11-25T22:59:09.536Z","epss":{"score":0.00285,"percentile":0.13585,"date":"2026-11-30T12:00:22.000Z"}}