Skip to content

pppd crashes with SIGILL (4) #576

@filippocarletti

Description

@filippocarletti

pppd crashes with "Fatal signal 4" in a PPPoE connection when built with FORTIFY_SOURCE on OpenWrt.
When built without FORTIFY_SOURCE the connection succeeds.
The issue is reproducible using the attached replay.pcap.gz.

OpenWrt connection logs:

Thu Jan 15 18:21:30 2026 daemon.notice netifd: Interface 'eolo' is setting up now
Thu Jan 15 18:21:30 2026 daemon.info pppd[11758]: Plugin pppoe.so loaded.
Thu Jan 15 18:21:30 2026 daemon.info pppd[11758]: PPPoE plugin from pppd 2.5.2
Thu Jan 15 18:21:30 2026 daemon.notice pppd[11758]: pppd 2.5.2 started by root, uid 0
Thu Jan 15 18:21:30 2026 daemon.info pppd[11758]: PPP session is 56000
Thu Jan 15 18:21:30 2026 daemon.warn pppd[11758]: Connected to 52:54:00:93:DC:01 via interface eth2
Thu Jan 15 18:21:30 2026 daemon.info pppd[11758]: Using interface pppoe-eolo
Thu Jan 15 18:21:30 2026 daemon.notice pppd[11758]: Connect: pppoe-eolo <--> eth2
Thu Jan 15 18:21:30 2026 daemon.info ModemManager[11766]: hotplug: add network interface pppoe-eolo: event processed
Thu Jan 15 18:21:31 2026 daemon.err pppd[11758]: Fatal signal 4
Thu Jan 15 18:21:31 2026 daemon.info ModemManager[11793]: hotplug: remove network interface pppoe-eolo: event processed
Thu Jan 15 18:21:31 2026 daemon.info pppd[11758]: Exit.

OPENWRT_RELEASE="OpenWrt 25.12.0-rc2 r32429-d76c64ad00" (pppd version 2.5.2, but happens also with 2.5.1)
OPENWRT_ARCH="x86_64"

gdb backtrace:

Program received signal SIGILL, Illegal instruction.
memcpy (__n=<optimized out>, __os=<optimized out>, __od=<optimized
out>, __od=<optimized out>, __os=<optimized out>, __n=<optimized out>)
    at ../../../../../../staging_dir/toolchain-x86_64_gcc-13.3.0_musl/include/fortify/string.h:50
(gdb) bt
#0  memcpy (__n=<optimized out>, __os=<optimized out>, __od=<optimized
out>, __od=<optimized out>, __os=<optimized out>, __n=<optimized out>)
    at ../../../../../../staging_dir/toolchain-x86_64_gcc-13.3.0_musl/include/fortify/string.h:50
#1  lcp_reqci (f=<optimized out>, inp=0x5555555b1368 <inpacket_buf+8>
"\001\004\005\324\002\006", lenp=0x7fffffffe89c, reject_if_disagree=0)
    at /home/build/openwrt/build_dir/target-x86_64_musl/linux-x86_64/ppp-default/ppp-2.5.1/pppd/lcp.c:1804

Build logs excerpt:

ppp version 2.5.2
    Prefix...............: /usr
    Runtime Dir..........: ${localstatedir}/run/pppd
    Logfile Dir..........: /var/log/ppp
    Plugin Dir...........: ${exec_prefix}/lib/pppd/2.5.2
    System CA Path ......: /etc/ssl/certs
    With OpenSSL.........: no
    With libatm..........: yes
    With libpam..........: no
    With libpcap.........: no
    With static libpcap..: yes
    With libsrp..........: no
    C Compiler...........: x86_64-openwrt-linux-musl-gcc -std=gnu23 -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/filippo/Projects/openwrt-git/build_dir/target-x86_64_musl/linux-x86_64/ppp-default/ppp-2.5.2=ppp-2.5.2 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -DPIC -fpic -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wl,-z,pack-relative-relocs 
    Linker...............: x86_64-openwrt-linux-musl-ld.bfd -m elf_x86_64 -L/home/filippo/Projects/openwrt-git/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/filippo/Projects/openwrt-git/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -DPIC -fpic -specs=/home/filippo/Projects/openwrt-git/include/hardened-ld-pie.specs -znow -zrelro -zpack-relative-relocs  

Features enabled
    Microsoft Extensions.: yes
    Multilink............: no
    Plugins..............: yes
    CBCP.................: no
    IPV6CP...............: yes
    EAP-TLS..............: no
    systemd notifications: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions