{"id":"CVE-2026-77658","aliases":["DEBIAN-CVE-2026-77658","EUVD-2026-66417","GHSA-ff24-wmrj-75w8","UBUNTU-CVE-2026-77658"],"status":"published","title":"Dia: dia: stack buffer overflow in bus object via unvalidated handle count in project files","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.\n\nIn objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:\n\n    bus-\u003enum_handles = attribute_num_data(attr);\n\nWhen a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:\n\n    parallel = (real *)g_alloca(num_handles * sizeof(real));\n    perp = (real *)g_alloca(num_handles * sizeof(real));\n\nBecause num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.\n\nAn attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.\n\nThe identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.\n\nAffected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.\nUpstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00202,"percentile":0.10145,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-121"],"published":"2026-08-26T12:10:07Z","modified":"2026-10-17T13:01:07Z","affected":[{"source":"osv","ecosystem":"Debian:12","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3+git20220525-5","0.98+git20240130-1","0.98+git20240528-1","0.98+git20240814-1","0.98+git20250126-1","0.98+git20250126-2","0.98+git20250827-1","0.98+git20250827-2","0.98+git20260221-1","0.98+git20260221-2","0.98+git20260221-3"]},{"source":"osv","ecosystem":"Debian:13","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.98+git20250126-2","0.98+git20250827-1","0.98+git20250827-2","0.98+git20260221-1","0.98+git20260221-2","0.98+git20260221-3"]},{"source":"osv","ecosystem":"Debian:14","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.98+git20250126-2","0.98+git20250827-1","0.98+git20250827-2","0.98+git20260221-1","0.98+git20260221-2","0.98+git20260221-3"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3+git20160930-6","0.97.3+git20160930-7","0.97.3+git20160930-8"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3+git20160930-8.1","0.97.3+git20160930-8.2","0.97.3+git20160930-9"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3+git20160930-9","0.97.3+git20160930-9build1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.97.3+git20220525-5build1","0.97.3+git20220525-5build2","0.97.3+git20220525-5build3","0.98+git20240130-1","0.98+git20240130-1build2","0.98+git20240130-1build3","0.98+git20240130-1build4"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.98+git20260221-1","0.98+git20260221-2","0.98+git20260221-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"dia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.98+git20250902-0ubuntu1","0.98+git20250902-0ubuntu2","0.98+git20260221-1"]}],"products":[{"vendor":"gnome","product":"dia"},{"vendor":"the browser company of new york","product":"dia"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-77658","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2520890","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://gitlab.gnome.org/GNOME/dia/-/blob/master/objects/network/bus.c"},{"url":"https://gitlab.gnome.org/GNOME/dia/-/issues/581","tags":["report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77658"},{"url":"https://github.com/advisories/GHSA-ff24-wmrj-75w8"},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-77658","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-77658","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-77658","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-77658","title":"Dia: dia: stack buffer overflow in bus object via unvalidated handle count in project files","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.\n\nIn objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:\n\n    bus-\u003enum_handles = attribute_num_data(attr);\n\nWhen a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:\n\n    parallel = (real *)g_alloca(num_handles * sizeof(real));\n    perp = (real *)g_alloca(num_handles * sizeof(real));\n\nBecause num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.\n\nAn attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.\n\nThe identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.\n\nAffected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.\nUpstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-26T12:10:07.556Z","modified":"2026-08-26T13:11:12.732Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T14:20:15.712761Z"}],"euvd":[{"id":"EUVD-2026-66417","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.\n\nIn objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:\n\n    bus-\u003enum_handles = attribute_num_data(attr);\n\nWhen a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:\n\n    parallel = (real *)g_alloca(num_handles * sizeof(real));\n    perp = (real *)g_alloca(num_handles * sizeof(real));\n\nBecause num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.\n\nAn attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.\n\nThe identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.\n\nAffected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.\nUpstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-26T12:10:07Z","modified":"2026-08-26T13:11:12Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T18:01:31.267984Z"}],"ghsa":[{"id":"GHSA-ff24-wmrj-75w8","title":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing...","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.\n\nIn objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:\n\n    bus-\u003enum_handles = attribute_num_data(attr);\n\nWhen a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:\n\n    parallel = (real *)g_alloca(num_handles * sizeof(real));\n    perp = (real *)g_alloca(num_handles * sizeof(real));\n\nBecause num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.\n\nAn attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.\n\nThe identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.\n\nAffected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.\nUpstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-28T18:31:23Z","modified":"2026-08-28T18:31:29Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T15:11:07.541511Z"}],"nvd":[{"id":"CVE-2026-77658","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.\n\nIn objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:\n\n    bus-\u003enum_handles = attribute_num_data(attr);\n\nWhen a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:\n\n    parallel = (real *)g_alloca(num_handles * sizeof(real));\n    perp = (real *)g_alloca(num_handles * sizeof(real));\n\nBecause num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.\n\nAn attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.\n\nThe identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.\n\nAffected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.\nUpstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-26T13:19:22.043Z","modified":"2026-08-28T15:44:39.323Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T14:12:41.66469Z"}],"osv":[{"id":"DEBIAN-CVE-2026-77658","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.  In objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:      bus-\u003enum_handles = attribute_num_data(attr);  When a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:      parallel = (real *)g_alloca(num_handles * sizeof(real));     perp = (real *)g_alloca(num_handles * sizeof(real));  Because num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.  An attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.  The identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.  Affected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21. Upstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-26T13:19:22.043Z","modified":"2026-10-01T03:03:42.203817472Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:46:03.502256Z"},{"id":"UBUNTU-CVE-2026-77658","description":"A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files. In objects/network/bus.c, bus_load() reads the number of bus handles from the file attribute \"bus_handles\" using attribute_num_data() without validating an upper bound:     bus-\u003enum_handles = attribute_num_data(attr); When a bus handle is subsequently moved, bus_handle_moved() allocates two temporary arrays on the stack:     parallel = (real *)g_alloca(num_handles * sizeof(real));     perp = (real *)g_alloca(num_handles * sizeof(real)); Because num_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption. An attacker can embed a Bus object with an excessive bus_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path. The identical g_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects. Affected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21. Upstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581","status":"published","published":"2026-08-26T13:19:00Z","modified":"2026-10-17T13:01:07.840096594Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:57:18.015985Z"}]}}
