All of lore.kernel.org
 help / color / mirror / Atom feed
* ZDI-CAN-29089: New Vulnerability Report
@ 2026-02-10 16:54 zdi-disclosures
  2026-02-10 16:56 ` ZDI-CAN-29088: " zdi-disclosures
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: zdi-disclosures @ 2026-02-10 16:54 UTC (permalink / raw)
  To: ofono@lists.linux.dev; +Cc: secalert@redhat.com, security@kernel.org

[-- Attachment #1: Type: text/plain, Size: 5861 bytes --]

ZDI-CAN-29089: oFono MBIM SMS Handling Heap-based Buffer Overflow Arbitrary Code Execution Vulnerability

-- CVSS -----------------------------------------

6.8: AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

-- ABSTRACT -------------------------------------

Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products:
oFono - oFono

-- VULNERABILITY DETAILS ------------------------
* Version tested:20.0.3
* Installer file:agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz
* Platform tested:Raspberry Pi

---

### Analysis

```
Bug 3: Heap Overflow
The most impactful bug being chained together in this exploit is a heap-based buffer
overflow in the MBIM device handling. The bug exists in the command_read_handler()
function of the mbim.c file:

static bool command_read_handler(struct l_io *io, void *user_data)
{
 struct mbim_device *device = user_data;
 ssize_t len;
 uint32_t type;
 int fd;
 struct mbim_message_header *hdr;
 struct iovec iov[2];
 uint32_t n_iov = 0;
 uint32_t header_size;
 struct mbim_message *message;
 uint32_t i;
 fd = l_io_get_fd(io);
 if (device->header_offset < sizeof(struct mbim_message_header)) {
 if (!receive_header(device, fd))
 return false;
 if (device->header_offset != sizeof(struct mbim_message_header))
 return true;
 }
 hdr = (struct mbim_message_header *) device->header;
 type = L_LE32_TO_CPU(hdr->typ

if (device->segment_bytes_remaining == 0)
 device->segment_bytes_remaining =
 L_LE32_TO_CPU(hdr->len) -
 sizeof(struct mbim_message_header);
 if (type == MBIM_COMMAND_DONE || type == MBIM_INDICATE_STATUS_MSG)
 header_size = HEADER_SIZE;
 else
 header_size = sizeof(struct mbim_message_header);
 /* Put the rest of the header into the first chunk */
 if (device->header_offset < header_size) {
 iov[n_iov].iov_base = device->header + device->header_offset;
 iov[n_iov].iov_len = header_size - device->header_offset;
 n_iov += 1;
 }
 l_util_debug(device->debug_handler, device->debug_data,
 "hdr->len: %u, header_size: %u, header_offset: %zu",
 L_LE32_TO_CPU(hdr->len), header_size,
 device->header_offset);
 l_util_debug(device->debug_handler, device->debug_data,
 "segment_bytes_remaining: %zu",
 device->segment_bytes_remaining);
 iov[n_iov].iov_base = device->segment + L_LE32_TO_CPU(hdr->len) -
 device->header_offset -
 device->segment_bytes_remaining;
 iov[n_iov].iov_len = device->segment_bytes_remaining -
 (header_size - device->header_offset);
 n_iov += 1;
 len = L_TFR(readv(fd, iov, n_iov));

In the code above, the vulnerability is that the hdr->len field specified by the user is
totally trusted and then used to set the device->segment_bytes_remaining field which is
used for keeping track of data to read into the MBIM session. Further below in the
function this can be used to cause heap overflow in the readv() call. The
segment_bytes_remaining field is used to set the iov_len field of the iovec which is
passed to readv(). Readv() is then used to read from the mbim character device into the

iovec object���s iov_base pointer of size iov_len. This vulnerability allows an unbounded
heap overflow into a pointer whose allocation size can be determined by a CDC
descriptor.

```


-- CREDIT ---------------------------------------
This vulnerability was discovered by:
Rob Blakely working with TrendAI Zero Day Initiative

-- FURTHER DETAILS ------------------------------

Supporting files:


If supporting files were contained with this report they are provided within a password protected ZIP file. The password is the ZDI candidate number in the form: ZDI-CAN-XXXX where XXXX is the ID number.

Please confirm receipt of this report. We expect all vendors to remediate ZDI vulnerabilities within 120 days of the reported date. If you are ready to release a patch at any point leading up to the deadline, please coordinate with us so that we may release our advisory detailing the issue. If the 120-day deadline is reached and no patch has been made available we will release a limited public advisory with our own mitigations, so that the public can protect themselves in the absence of a patch. Please keep us updated regarding the status of this issue and feel free to contact us at any time:

Zero Day Initiative
zdi-disclosures@trendmicro.com

The PGP key used for all ZDI vendor communications is available from:

  http://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc

-- INFORMATION ABOUT THE ZDI --------------------
Established by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.

Please contact us for further details or refer to:

  http://www.zerodayinitiative.com

-- DISCLOSURE POLICY ----------------------------

Our vulnerability disclosure policy is available online at:

  http://www.zerodayinitiative.com/advisories/disclosure_policy/
    

TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential
and may be subject to copyright or other intellectual property protection.
If you are not the intended recipient, you are not authorized to use or
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
For details about what personal information we collect and why, please see our Privacy Notice on our website at: [ https://www.trendmicro.com/privacy]

[-- Attachment #2: ZDI-CAN-29089.zip --]
[-- Type: application/x-zip-compressed, Size: 288753 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-12 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 16:54 ZDI-CAN-29089: New Vulnerability Report zdi-disclosures
2026-02-10 16:56 ` ZDI-CAN-29088: " zdi-disclosures
2026-02-10 16:57 ` ZDI-CAN-28993: " zdi-disclosures
2026-02-10 17:01 ` ZDI-CAN-29089: " Willy Tarreau
2026-03-12 19:13   ` zdi-disclosures
2026-03-12 20:13     ` Sicelo
2026-03-12 20:32       ` Morgan Hughes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.