{"id":"CVE-2025-68308","state":"PUBLISHED","title":"can: kvaser_usb: leaf: Fix potential infinite loop in command parsers","description":"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.","publishedAt":"2025-12-16T15:06:25.081Z","updatedAt":"2026-05-11T21:50:39.573Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"58343e0a4d43699f0e2f5b169384bbe4c0217add","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"69c7825df64e24dc15d31631a1fc9145324b1345","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"028e89c7e8b4346302e88df01cc50e0a1f05791a","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"e9dd83a75a7274edef21682c823bf0b66d7b6b7f","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"0897cea266e39166a36111059ba147192b36592f","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"bd8135a560cf6e64f0b98ed4daadf126a38f7f48","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"0c73772cd2b8cc108d5f5334de89ad648d89b9ec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.119","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.61","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.11","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c"]}],"references":["https://git.kernel.org/stable/c/58343e0a4d43699f0e2f5b169384bbe4c0217add","https://git.kernel.org/stable/c/69c7825df64e24dc15d31631a1fc9145324b1345","https://git.kernel.org/stable/c/028e89c7e8b4346302e88df01cc50e0a1f05791a","https://git.kernel.org/stable/c/e9dd83a75a7274edef21682c823bf0b66d7b6b7f","https://git.kernel.org/stable/c/0897cea266e39166a36111059ba147192b36592f","https://git.kernel.org/stable/c/bd8135a560cf6e64f0b98ed4daadf126a38f7f48","https://git.kernel.org/stable/c/0c73772cd2b8cc108d5f5334de89ad648d89b9ec"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:56.034Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/68xxx/CVE-2025-68308.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-68308","state":"PUBLISHED","datePublished":"2025-12-16T15:06:25.081Z","dateUpdated":"2026-05-11T21:50:39.573Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-16T14:48:05.294Z"},"containers":{"cna":{"title":"can: kvaser_usb: leaf: Fix potential infinite loop in command parsers","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"58343e0a4d43699f0e2f5b169384bbe4c0217add","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"69c7825df64e24dc15d31631a1fc9145324b1345","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"028e89c7e8b4346302e88df01cc50e0a1f05791a","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"e9dd83a75a7274edef21682c823bf0b66d7b6b7f","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"0897cea266e39166a36111059ba147192b36592f","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"bd8135a560cf6e64f0b98ed4daadf126a38f7f48","versionType":"git"},{"version":"7259124eac7d1b76b41c7a9cb2511a30556deebe","status":"affected","lessThan":"0c73772cd2b8cc108d5f5334de89ad648d89b9ec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.119","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.61","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.11","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/58343e0a4d43699f0e2f5b169384bbe4c0217add"},{"url":"https://git.kernel.org/stable/c/69c7825df64e24dc15d31631a1fc9145324b1345"},{"url":"https://git.kernel.org/stable/c/028e89c7e8b4346302e88df01cc50e0a1f05791a"},{"url":"https://git.kernel.org/stable/c/e9dd83a75a7274edef21682c823bf0b66d7b6b7f"},{"url":"https://git.kernel.org/stable/c/0897cea266e39166a36111059ba147192b36592f"},{"url":"https://git.kernel.org/stable/c/bd8135a560cf6e64f0b98ed4daadf126a38f7f48"},{"url":"https://git.kernel.org/stable/c/0c73772cd2b8cc108d5f5334de89ad648d89b9ec"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:50:39.573Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.10.247"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.15.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.1.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.6.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.12.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.17.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}