1
0
Fork 0
forked from mirror/openwrt
openwrt/package/network/services/ppp/patches
Paul Donald 1e9da9798a ppp: add memmove fortify and remove MRU patch
memcpy() with overlapping src and dest buffers is an undefined behavior
in C. In the current code, a ConfRej response is generated by copying
input data in-place, where the dest address is lower than the src.
This happens to work in practice because memcpy() forward-copies data,
matching the behavior of memmove() in this case.

However, if FORTIFY_SOURCE or Address Sanitizer is enabled, memcpy()
will detect the overlap at run time and abort the program.

Replace the memcpy() with memmove() to ensure a well-defined behavior.

Reported-by: Filippo Carletti <filippo.carletti@gmail.com>

MRU patch https://github.com/ppp-project/ppp/pull/573

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22286
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 00:04:48 +01:00
..
000-pppd-session-fixed-building-with-gcc-15.patch ppp: fix building with GCC 15.1 2025-06-08 12:20:15 +02:00
001-pppdump-fixed-building-with-gcc-15.patch ppp: fix building with GCC 15.1 2025-06-08 12:20:15 +02:00
105-debian_demand.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
204-radius_config.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
207-lcp_mtu_max.patch ppp: update to 2.5.1 2024-10-12 15:53:06 +02:00
208-fix_status_code.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
310-precompile_filter.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
321-multilink_support_custom_iface_names.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
340-populate_default_gateway.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
400-simplify_kernel_checks.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
401-no_record_file.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
404-remove_obsolete_protocol_names.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
405-no_multilink_option.patch ppp: update to 2.5.1 2024-10-12 15:53:06 +02:00
500-add-pptp-plugin.patch ppp: update to 2.5.2 2025-01-05 22:50:20 +01:00
501-fix-memcpy-fortify.patch ppp: add memmove fortify and remove MRU patch 2026-03-07 00:04:48 +01:00
502-remove_mru.patch ppp: add memmove fortify and remove MRU patch 2026-03-07 00:04:48 +01:00