{"id":"CVE-2024-39480","aliases":["CVE-2024-39480"],"related":[],"kind":"vulnerability","state":"published","title":"kdb: Fix buffer overflow during tab-complete","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nkdb: Fix buffer overflow during tab-complete\n\nCurrently, when the user attempts symbol completion with the Tab key, kdb\nwill use strncpy() to insert the completed symbol into the command buffer.\nUnfortunately it passes the size of the source buffer rather than the\ndestination to strncpy() with predictably horrible results. Most obviously\nif the command buffer is already full but cp, the cursor position, is in\nthe middle of the buffer, then we will write past the end of the supplied\nbuffer.\n\nFix this by replacing the dubious strncpy() calls with memmove()/memcpy()\ncalls plus explicit boundary checks to make sure we have enough space\nbefore we start moving characters around.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nkdb: Fix buffer overflow during tab-complete\n\nCurrently, when the user attempts symbol completion with the Tab key, kdb\nwill use strncpy() to insert the completed symbol into the command buffer.\nUnfortunately it passes the size of the source buffer rather than the\ndestination to strncpy() with predictably horrible results. Most obviously\nif the command buffer is already full but cp, the cursor position, is in\nthe middle of the buffer, then we will write past the end of the supplied\nbuffer.\n\nFix this by replacing the dubious strncpy() calls with memmove()/memcpy()\ncalls plus explicit boundary checks to make sure we have enough space\nbefore we start moving characters around.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: kdb: corrige el desbordamiento del búfer durante la finalización de tabulación Actualmente, cuando el usuario intenta completar el símbolo con la tecla Tab, kdb usará strncpy() para insertar el símbolo completado en el búfer de comando. Desafortunadamente, pasa el tamaño del búfer de origen en lugar del destino a strncpy() con resultados predeciblemente horribles. Lo más obvio es que si el búfer de comando ya está lleno pero cp, la posición del cursor, está en el medio del búfer, entonces escribiremos más allá del final del búfer proporcionado. Solucione este problema reemplazando las dudosas llamadas strncpy() con llamadas memmove()/memcpy() más comprobaciones explícitas de los límites para asegurarnos de que tenemos suficiente espacio antes de comenzar a mover los personajes.","source":"nvd"}],"published":"2024-07-05T06:55:09.241Z","modified":"2026-08-05T11:33:34.087Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-120","CWE-121"],"affected":[{"ranges":[{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"fb824a99e148ff272a53d71d84122728b5f00992","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"ddd2972d8e2dee3b33e8121669d55def59f0be8a","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"cfdc2fa4db57503bc6d3817240547c8ddc55fa96","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"f636a40834d22e5e3fc748f060211879c056cd33","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"33d9c814652b971461d1e30bead6792851c209e7","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"107e825cc448b7834b31e8b1b3cf0f57426d46d5","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"f694da720dcf795dc3eb97bf76d220213f76aaa7","status":"affected"},{"type":"git","introduced":"5d5314d6795f3c1c0f415348ff8c51f7de042b77","fixed":"e9730744bf3af04cda23799029342aa3cddbc454","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.35","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.35","status":"unaffected"},{"type":"semver","introduced":"4.19.316","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.278","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.219","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.161","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.94","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.34","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.5","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"git","introduced":"1da177e4c3f4","fixed":"fb824a99e148","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"ddd2972d8e2d","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"cfdc2fa4db57","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"f636a40834d2","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"33d9c814652b","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"107e825cc448","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"f694da720dcf","status":"affected"},{"type":"git","introduced":"1da177e4c3f4","fixed":"e9730744bf3a","status":"affected"},{"type":"git","introduced":"4.19.316","lastAffected":"4.20","status":"unaffected"},{"type":"git","introduced":"5.4.278","lastAffected":"5.5","status":"unaffected"},{"type":"git","introduced":"5.10.219","lastAffected":"5.11","status":"unaffected"},{"type":"git","introduced":"5.15.161","lastAffected":"5.16","status":"unaffected"},{"type":"git","introduced":"6.1.94","lastAffected":"6.2","status":"unaffected"},{"type":"git","introduced":"6.6.34","lastAffected":"6.7","status":"unaffected"},{"type":"git","introduced":"6.9.5","lastAffected":"6.10","status":"unaffected"},{"type":"git","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:a:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19","fixed":"4.19.316"},{"status":"affected","introduced":"5.4","fixed":"5.4.278"},{"status":"affected","introduced":"5.10","fixed":"5.10.219"},{"status":"affected","introduced":"5.15","fixed":"5.15.161"},{"status":"affected","introduced":"6.1","fixed":"6.1.94"},{"status":"affected","introduced":"6.6","fixed":"6.6.34"},{"status":"affected","introduced":"6.9","fixed":"6.9.5"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/fb824a99e148ff272a53d71d84122728b5f00992","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ddd2972d8e2dee3b33e8121669d55def59f0be8a","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cfdc2fa4db57503bc6d3817240547c8ddc55fa96","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f636a40834d22e5e3fc748f060211879c056cd33","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/33d9c814652b971461d1e30bead6792851c209e7","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/107e825cc448b7834b31e8b1b3cf0f57426d46d5","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f694da720dcf795dc3eb97bf76d220213f76aaa7","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e9730744bf3af04cda23799029342aa3cddbc454","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-08-20T03:55:14.759Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39480","url":"https://www.cve.org/CVERecord?id=CVE-2024-39480","licence":"CVE Terms of Use","modified":"2026-08-05T11:33:34.087Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39480","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39480","licence":"Public domain","modified":"2026-08-04T11:18:58.420Z"}],"updatedAt":"2026-11-25T22:58:42.519Z","epss":{"score":0.00271,"percentile":0.20651,"date":"2026-12-01T12:00:22.000Z"}}