Medium
Security advisory
ldebug.c in Lua 5.4.0 allows a negation overflow and segmentation fault in getlocal and setlocal, as demonstrated by getlocal(3,2^31).
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-24370
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:36 UTC · Revision 1
Source evidence
ldebug.c in Lua 5.4.0 allows a negation overflow and segmentation fault in getlocal and setlocal, as demonstrated by getlocal(3,2^31).
osv:CVE-2020-24370
Complete source record
{
"id": "f84c2df567d36c196e7e4ce3a8e2715744fd84b21478251d3950c92bb4cfc2be",
"url": "https://osv.dev/vulnerability/CVE-2020-24370",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-24370",
"summary": "ldebug.c in Lua 5.4.0 allows a negation overflow and segmentation fault in getlocal and setlocal, as demonstrated by getlocal(3,2^31).",
"evidence": "osv:CVE-2020-24370",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2020-24370",
"aliases": [
"BIT-lua-2020-24370",
"CVE-2020-24370"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/lua/lua",
"type": "GIT",
"events": [
{
"introduced": "e2fc2ce8dfe107d1e2742b459c2aaf137227bbc1"
},
{
"last_affected": "c33b1728aeb7dfeec4013562660e07d32697aa6b"
},
{
"fixed": "a585eae6e7ada1ca9271607a4f48dfb17868ab7b"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:lua:lua:5.2.0:-:*:*:*:*:*:*",
"range": [
{
"introduced": "5.2.0-NA"
},
{
"last_affected": "5.2.0-NA"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.2.1:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.2.1"
},
{
"last_affected": "5.2.1"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.2.2:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.2.2"
},
{
"last_affected": "5.2.2"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.2.3:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.2.3"
},
{
"last_affected": "5.2.3"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.0:-:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.0-NA"
},
{
"last_affected": "5.3.0-NA"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.1:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.1"
},
{
"last_affected": "5.3.1"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.2:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.2"
},
{
"last_affected": "5.3.2"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.3:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.3"
},
{
"last_affected": "5.3.3"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.4:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.4"
},
{
"last_affected": "5.3.4"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.3.5:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.3.5"
},
{
"last_affected": "5.3.5"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:lua:lua:5.4.0:-:*:*:*:*:*:*",
"range": [
{
"introduced": "5.4.0-NA"
},
{
"last_affected": "5.4.0-NA"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "a585eae6e7ada1ca9271607a4f48dfb17868ab7b"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"5.2.0-NA",
"5.2.1",
"5.2.2",
"5.2.3",
"5.3.0-NA",
"5.3.1",
"5.3.2",
"5.3.3",
"5.3.4",
"5.3.5",
"5.4.0-NA",
"v5.4.0",
"v5.4-beta",
"v5.4-alpha",
"v5.3.4",
"v5.4-w2",
"v5.3.3",
"v5.3.2",
"v5.3.1",
"v5.3.0",
"v5.3-beta",
"v5.3-alpha",
"v5.2.2",
"v5.2.1",
"v5.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-24370.json",
"vanir_signatures": [
{
"id": "CVE-2020-24370-3408fa99",
"digest": {
"length": 606,
"function_hash": "160457310741932794514906761248697216809"
},
"source": "https://github.com/lua/lua/commit/a585eae6e7ada1ca9271607a4f48dfb17868ab7b",
"target": {
"file": "ldebug.c",
"function": "luaG_findlocal"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2020-24370-a6e6ec70",
"digest": {
"length": 298,
"function_hash": "176948320927037737175998274991413929359"
},
"source": "https://github.com/lua/lua/commit/a585eae6e7ada1ca9271607a4f48dfb17868ab7b",
"target": {
"file": "ldebug.c",
"function": "findvararg"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2020-24370-caf2fa2e",
"digest": {
"threshold": 0.9,
"line_hashes": [
"308106254715576835832771124558186333737",
"28150857163617153757180128882987340278",
"67856167705625202229537381893379792047",
"118168772934001778875555195425693302437",
"316101619877408557194703765822106706457",
"103962487352111355186447672861982043630",
"180146486087139942444320654781720975268",
"293123111573401127190810486268369394313",
"110117011450095061191785096815592359580"
]
},
"source": "https://github.com/lua/lua/commit/a585eae6e7ada1ca9271607a4f48dfb17868ab7b",
"target": {
"file": "ldebug.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T13:56:57Z"
}
}
],
"modified": "2026-10-20T13:56:57.848351237Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2020/09/msg00019.html",
"https://lists.debian.org/debian-lts-announce/2023/06/msg00031.html",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/E6KONNG6UEI3FMEOY67NDZC32NBGBI44/",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QXYMCIUNGK26VHAYHGP5LPW56G2KWOHQ/",
"https://github.com/lua/lua/commit/a585eae6e7ada1ca9271607a4f48dfb17868ab7b"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*",
"cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*"
],
"vendor_product": "fedoraproject:fedora",
"extracted_events": [
{
"range": [
{
"introduced": "31"
},
{
"last_affected": "31"
},
{
"introduced": "32"
},
{
"last_affected": "32"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:lua:lua:5.2.0:alpha:*:*:*:*:*:*",
"cpe:2.3:a:lua:lua:5.2.0:beta:*:*:*:*:*:*",
"cpe:2.3:a:lua:lua:5.3.0:alpha:*:*:*:*:*:*",
"cpe:2.3:a:lua:lua:5.3.0:beta:*:*:*:*:*:*",
"cpe:2.3:a:lua:lua:5.4.0:alpha:*:*:*:*:*:*",
"cpe:2.3:a:lua:lua:5.4.0:beta:*:*:*:*:*:*"
],
"vendor_product": "lua:lua",
"extracted_events": [
{
"range": [
{
"introduced": "5.2.0-alpha"
},
{
"last_affected": "5.2.0-alpha"
},
{
"introduced": "5.2.0-beta"
},
{
"last_affected": "5.2.0-beta"
},
{
"introduced": "5.3.0-alpha"
},
{
"last_affected": "5.3.0-alpha"
},
{
"introduced": "5.3.0-beta"
},
{
"last_affected": "5.3.0-beta"
},
{
"introduced": "5.4.0-alpha"
},
{
"last_affected": "5.4.0-alpha"
},
{
"introduced": "5.4.0-beta"
},
{
"last_affected": "5.4.0-beta"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2020-24370",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388442,
"published_at": "2020-08-17T17:15:13.877+00:00"
}