{"api_version":"1","generated_at":"2026-04-23T02:25:58+00:00","cve":"CVE-2026-31513","urls":{"html":"https://cve.report/CVE-2026-31513","api":"https://cve.report/api/cve/CVE-2026-31513.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31513","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31513"},"summary":{"title":"Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req\n\nSyzbot reported a KASAN stack-out-of-bounds read in l2cap_build_cmd()\nthat is triggered by a malformed Enhanced Credit Based Connection Request.\n\nThe vulnerability stems from l2cap_ecred_conn_req(). The function allocates\na local stack buffer (`pdu`) designed to hold a maximum of 5 Source Channel\nIDs (SCIDs), totaling 18 bytes. When an attacker sends a request with more\nthan 5 SCIDs, the function calculates `rsp_len` based on this unvalidated\n`cmd_len` before checking if the number of SCIDs exceeds\nL2CAP_ECRED_MAX_CID.\n\nIf the SCID count is too high, the function correctly jumps to the\n`response` label to reject the packet, but `rsp_len` retains the\nattacker's oversized value. Consequently, l2cap_send_cmd() is instructed\nto read past the end of the 18-byte `pdu` buffer, triggering a\nKASAN panic.\n\nFix this by moving the assignment of `rsp_len` to after the `num_scid`\nboundary check. If the packet is rejected, `rsp_len` will safely\nremain 0, and the error response will only read the 8-byte base header\nfrom the stack.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-22 14:16:50","updated_at":"2026-04-22 14:16:50"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/c8e1a27edb8b4e5afb56b384acd7b6c2dec1b7cc","name":"https://git.kernel.org/stable/c/c8e1a27edb8b4e5afb56b384acd7b6c2dec1b7cc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5b35f8211a913cfe7ab9d54fa36a272d2059a588","name":"https://git.kernel.org/stable/c/5b35f8211a913cfe7ab9d54fa36a272d2059a588","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a3d9c50d69785ae02e153f000da1b5fd6dbfdf1b","name":"https://git.kernel.org/stable/c/a3d9c50d69785ae02e153f000da1b5fd6dbfdf1b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9d87cb22195b2c67405f5485d525190747ad5493","name":"https://git.kernel.org/stable/c/9d87cb22195b2c67405f5485d525190747ad5493","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31513","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31513","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 935f324e4b2461df2cf7f02b4195082b4304c708 c8e1a27edb8b4e5afb56b384acd7b6c2dec1b7cc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e981a9392800ce2c5bca196a6ab2c55e9370efaa 5b35f8211a913cfe7ab9d54fa36a272d2059a588 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f3fdf2e7276a3edc5df55454275da20eac186970 a3d9c50d69785ae02e153f000da1b5fd6dbfdf1b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c28d2bff70444a85b3b86aaf241ece9408c7858c 9d87cb22195b2c67405f5485d525190747ad5493 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.75 6.12.80 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.16 6.18.21 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.19.6 6.19.11 semver","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/bluetooth/l2cap_core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"c8e1a27edb8b4e5afb56b384acd7b6c2dec1b7cc","status":"affected","version":"935f324e4b2461df2cf7f02b4195082b4304c708","versionType":"git"},{"lessThan":"5b35f8211a913cfe7ab9d54fa36a272d2059a588","status":"affected","version":"e981a9392800ce2c5bca196a6ab2c55e9370efaa","versionType":"git"},{"lessThan":"a3d9c50d69785ae02e153f000da1b5fd6dbfdf1b","status":"affected","version":"f3fdf2e7276a3edc5df55454275da20eac186970","versionType":"git"},{"lessThan":"9d87cb22195b2c67405f5485d525190747ad5493","status":"affected","version":"c28d2bff70444a85b3b86aaf241ece9408c7858c","versionType":"git"}]},{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/bluetooth/l2cap_core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"6.12.80","status":"affected","version":"6.12.75","versionType":"semver"},{"lessThan":"6.18.21","status":"affected","version":"6.18.16","versionType":"semver"},{"lessThan":"6.19.11","status":"affected","version":"6.19.6","versionType":"semver"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.80","versionStartIncluding":"6.12.75","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.21","versionStartIncluding":"6.18.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.11","versionStartIncluding":"6.19.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req\n\nSyzbot reported a KASAN stack-out-of-bounds read in l2cap_build_cmd()\nthat is triggered by a malformed Enhanced Credit Based Connection Request.\n\nThe vulnerability stems from l2cap_ecred_conn_req(). The function allocates\na local stack buffer (`pdu`) designed to hold a maximum of 5 Source Channel\nIDs (SCIDs), totaling 18 bytes. When an attacker sends a request with more\nthan 5 SCIDs, the function calculates `rsp_len` based on this unvalidated\n`cmd_len` before checking if the number of SCIDs exceeds\nL2CAP_ECRED_MAX_CID.\n\nIf the SCID count is too high, the function correctly jumps to the\n`response` label to reject the packet, but `rsp_len` retains the\nattacker's oversized value. Consequently, l2cap_send_cmd() is instructed\nto read past the end of the 18-byte `pdu` buffer, triggering a\nKASAN panic.\n\nFix this by moving the assignment of `rsp_len` to after the `num_scid`\nboundary check. If the packet is rejected, `rsp_len` will safely\nremain 0, and the error response will only read the 8-byte base header\nfrom the stack."}],"providerMetadata":{"dateUpdated":"2026-04-22T13:54:30.835Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/c8e1a27edb8b4e5afb56b384acd7b6c2dec1b7cc"},{"url":"https://git.kernel.org/stable/c/5b35f8211a913cfe7ab9d54fa36a272d2059a588"},{"url":"https://git.kernel.org/stable/c/a3d9c50d69785ae02e153f000da1b5fd6dbfdf1b"},{"url":"https://git.kernel.org/stable/c/9d87cb22195b2c67405f5485d525190747ad5493"}],"title":"Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-31513","datePublished":"2026-04-22T13:54:30.835Z","dateReserved":"2026-03-09T15:48:24.107Z","dateUpdated":"2026-04-22T13:54:30.835Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-22 14:16:50","lastModifiedDate":"2026-04-22 14:16:50","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31513","Ordinal":"1","Title":"Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_co","CVE":"CVE-2026-31513","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31513","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req\n\nSyzbot reported a KASAN stack-out-of-bounds read in l2cap_build_cmd()\nthat is triggered by a malformed Enhanced Credit Based Connection Request.\n\nThe vulnerability stems from l2cap_ecred_conn_req(). The function allocates\na local stack buffer (`pdu`) designed to hold a maximum of 5 Source Channel\nIDs (SCIDs), totaling 18 bytes. When an attacker sends a request with more\nthan 5 SCIDs, the function calculates `rsp_len` based on this unvalidated\n`cmd_len` before checking if the number of SCIDs exceeds\nL2CAP_ECRED_MAX_CID.\n\nIf the SCID count is too high, the function correctly jumps to the\n`response` label to reject the packet, but `rsp_len` retains the\nattacker's oversized value. Consequently, l2cap_send_cmd() is instructed\nto read past the end of the 18-byte `pdu` buffer, triggering a\nKASAN panic.\n\nFix this by moving the assignment of `rsp_len` to after the `num_scid`\nboundary check. If the packet is rejected, `rsp_len` will safely\nremain 0, and the error response will only read the 8-byte base header\nfrom the stack.","Type":"Description","Title":"Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_co"}]}}}