There is a potential OOB write in the gen_prov_cont function of the
pb_adv.c file. This vulnerability occurs because the seg variable,
which is user-controlled, is used to compute the offset where data is
copied into. However, an integer underflow and overflow invalidates
its validation.
Potential Impact
An out-of-bound write can lead to an arbitrary code execution. This is more severe in real-time
operating systems like Zephyr that run in embedded devices without common memory
protection systems. Even on devices with some form of memory protection, this can still lead to
a crash and a resultant denial of service.
Patches
main: #95061
4.2: #97518
4.1: #97517
For more information
If you have any questions or comments about this advisory:
embargo: 2025-11-24
There is a potential OOB write in the
gen_prov_contfunction of thepb_adv.cfile. This vulnerability occurs because the seg variable,which is user-controlled, is used to compute the offset where data is
copied into. However, an integer underflow and overflow invalidates
its validation.
segis computed fromrx->gpcin https://github.com/zephyrprojectrtos/zephyr/blob/main/subsys/bluetooth/mesh/pb_adv.c#L483.((20 + ((seg - 1) * 23))) and the length of data does not overflow the receiver buffer.seg = 0, the computation will yield an offset of 253seg - 1underflows, yielding 255255 * 23overflows multiple times, yielding 233233 + 20yields 253buf->lenhas a value greater than 2, then adding it to 253 overflows, yielding a numberthat is potentially less than
RX_BUFFER_MAX (65).memcpyinline https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/bluetooth/mesh/pb_adv.c#541. This can cause a large out-of-bound writein the
rx.buf->dataarray.Potential Impact
An out-of-bound write can lead to an arbitrary code execution. This is more severe in real-time
operating systems like Zephyr that run in embedded devices without common memory
protection systems. Even on devices with some form of memory protection, this can still lead to
a crash and a resultant denial of service.
Patches
main: #95061
4.2: #97518
4.1: #97517
For more information
If you have any questions or comments about this advisory:
embargo: 2025-11-24