{"id":"CVE-2025-30356","published":"2025-04-01T22:06:22Z","modified":"2025-04-02T13:46:42Z","title":"Heap Buffer Overflow via Incomplete Length Check in `Crypto_TC_ApplySecurity`","vendor":"nasa","product":"CryptoLib","tier":"tail","description":{"text":"CryptoLib provides a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station. In 1.3.3 and earlier, a heap buffer overflow vulnerability persists in the Crypto_TC_ApplySecurity function due to an incomplete validation check on the fl (frame length) field. Although CVE-2025-29912 addressed an underflow issue involving fl, the patch fails to fully prevent unsafe calculations. As a result, an attacker can still craft malicious frames that cause a negative tf_payload_len, which is then interpreted as a large unsigned value, leading to a heap buffer overflow in a memcpy call.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00671,"percentile":0.52972,"provenance":"source"},"cwes":[{"id":"CWE-191","name":"Integer Underflow (Wrap or Wraparound)"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/nasa/CryptoLib/security/advisories/GHSA-6w2x-w7w3-85w2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nasa/CryptoLib/commit/59d1bce7608c94c6131ef4877535075b0649799c","tags":["x_refsource_MISC"]}],"priority":{"score":17.1,"factors":[{"name":"EPSS percentile","points":10.59},{"name":"CVSS severity","points":6.51}]},"vendorSlug":"nasa","affectedVersions":[{"vendor":"nasa","product":"CryptoLib","versions":["<= 1.3.3"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2025-04-02T13:46:23.793681Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-9499","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-nasa-cryptolib-cve-2025-29909","parents":[{"from":"CVE-2025-29909","to":"CVE-2025-30356","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/core/crypto_tc.c"],"commits":["https://github.com/nasa/CryptoLib/commit/c7e8a8745ff4b5e9bd7e500e91358e86d5abedcc","https://github.com/nasa/CryptoLib/commit/59d1bce7608c94c6131ef4877535075b0649799c"],"basis":"shared function","functions":["Crypto_TC_ProcessSecurity_Cam"]}]},{"from":"CVE-2025-29912","to":"CVE-2025-30356","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/core/crypto_tc.c"],"commits":["https://github.com/nasa/CryptoLib/commit/ca39cb96f21e76102aefb956d2c8c0ba0bd143ca","https://github.com/nasa/CryptoLib/commit/59d1bce7608c94c6131ef4877535075b0649799c"],"basis":"shared function","functions":["Crypto_TC_ProcessSecurity_Cam"]}]},{"from":"CVE-2025-30216","to":"CVE-2025-30356","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["include/crypto_error.h","src/core/crypto_error.c","src/core/crypto_tc.c"],"commits":["https://github.com/nasa/CryptoLib/commit/810fd66d592c883125272fef123c3240db2f170f","https://github.com/nasa/CryptoLib/commit/59d1bce7608c94c6131ef4877535075b0649799c"],"basis":"shared function","functions":["Crypto_TC_ProcessSecurity_Cam"]}]}],"children":[{"from":"CVE-2025-30356","to":"CVE-2025-54878","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["include/crypto_error.h","src/core/crypto_error.c","src/core/crypto_tc.c"],"commits":["https://github.com/nasa/CryptoLib/commit/59d1bce7608c94c6131ef4877535075b0649799c","https://github.com/nasa/CryptoLib/commit/9b5b294ec09da450d2d4d05aea2db604ead48be1"],"basis":"shared function","functions":["Crypto_TC_ApplySecurity_Cam"]}]}]}}