summaryrefslogtreecommitdiff
path: root/.github
AgeCommit message (Collapse)Author
41 hourstests: fix DHCPv6 fixtures after DNS refactoring and add CI coverageDenys Fedoryshchenko
Use the shared DNS storage and production allocator in the DHCPv6 fixture. Check bounded large DNS replies, preserve the repeated-ORO overflow regression, and check domain-list allocation failure in both reply builders. Link ipv6_dns.c and stub the truncation warning. Run the standalone suites and CTest in sanitizer CI, and replace the stale documented failure with current instructions. Validation: all six standalone suites pass with ASan/UBSan (LCP uses UBSan); both CTest checks pass. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-10-06ipv6: remove obsolete three-server DNS limitDenys Fedoryshchenko
The legacy limit matches RFC 6106's recommendation that hosts treat three learned RDNSS addresses as sufficient. That was host-side repository guidance, not a limit in the RADIUS, DHCPv6, or RDNSS encodings. RFC 8106 obsoletes RFC 6106 and explicitly removes the recommendation to limit learned RDNSS addresses to three, leaving the number to local policy. It instead recommends the ability to store at least three addresses when DNS information comes from multiple sources. Store both configured and per-session servers in reusable contiguous arrays. Start with a four-address, 64-byte allocation, grow geometrically, retain capacity across reload or reauthorization, and free session storage only at teardown. Bound advertised lists by actual DHCPv6 and router-advertisement packet space. Warn when servers have to be dropped for lack of room, as the fixed limit used to, skip the DNS search list rather than write it past the end of a full advertisement, and drop the stale three-server wording from the [ipv6-dns] documentation. Link: https://github.com/accel-ppp/accel-ppp/commit/4f562467dbdf819395e138617c2a057e02595b9e#r197212083 Link: https://www.rfc-editor.org/rfc/rfc6106.html#section-5.3.1 Link: https://www.rfc-editor.org/rfc/rfc8106.html#section-5.3.1 Link: https://www.rfc-editor.org/rfc/rfc8106.html#appendix-A
2026-10-06Merge pull request #358 from nuclearcat/fix/kernel-module-installDenys Fedoryshchenko
cmake: fix kernel module installation
2026-09-11ci: remove qemu build from BE (s390x) workflow using qemu from ubuntu 26.04Sergey V. Lobanov
2026-09-11ci: remove debian11 as EoL, add ubuntu 26:04Sergey V. Lobanov
2026-08-31Merge pull request #346 from nuclearcat/ipoe-stale-session-flushDenys Fedoryshchenko
Ipoe stale session flush fixes
2026-08-30cmake: fix kernel module installationDenys Fedoryshchenko
Install each module from its real build directory, propagate staged install roots, and fail when kbuild modules_install fails. Add a rootless CTest and CI regression for successful and failed installs. Best practices followed: Use the standard CMake DESTDIR and kbuild INSTALL_MOD_PATH staging interfaces: https://cmake.org/cmake/help/latest/envvar/DESTDIR.html https://docs.kernel.org/kbuild/modules.html#install-mod-path Check child command status with execute_process RESULT_VARIABLE: https://cmake.org/cmake/help/latest/command/execute_process.html Register repeatable tests with CTest add_test: https://cmake.org/cmake/help/latest/command/add_test.html
2026-08-12ipv6: assign DNS servers per session from RADIUSDenys Fedoryshchenko
The ipv6_nd and ipv6_dhcp modules could only advertise the DNS servers configured in [ipv6-dns], the same set for every subscriber. RFC 6911 defines DNS-Server-IPv6-Address (attribute 169) for exactly this, and the attribute was already in the shipped dictionary and in attr_defs.h; nothing read it. Give struct ap_session an ipv6_dns list, filled by the radius module from that attribute, and have both modules advertise it when the session has one: in the RDNSS option of the router advertisements, and in the DNS_SERVERS option of DHCPv6 replies. Sessions without a list of their own keep getting the configured servers, so nothing changes for anyone not sending the attribute. The selection is a single ipv6_dns_get() shared by both modules rather than a copy in each: they already duplicate the whole [ipv6-dns] parser, and two copies of a precedence rule are two chances to drift. It caps what it returns, so neither the RDNSS option length (one byte, in units of 8) nor the router advertisement buffer can be pushed around by what a RADIUS server sends. The radius module caps at the same 3 servers as [ipv6-dns] accepts and warns once when a reply carries more. An Access-Accept which carries the attribute replaces the whole previously assigned list rather than appending to it, so a re-authorized session ends up with the servers of the latest reply and not with a concatenation. One which does not carry it leaves the current list alone, which is how the IPv4 MS-Primary-DNS-Server attribute already behaves. ipv6_dns_test.c covers the selection: assigned wins over configured, empty list means "nothing assigned" rather than "no DNS", the cap holds for both sources, and a caller with no room gets nothing rather than a stomped buffer. Wired into the ASAN/UBSAN workflow. Inspired by the per-session IPv6 DNS support in accel-ppp-ng (commit 2df6eb99), reimplemented against mainline's ap_session and ipdb types.
2026-08-12l2tp: validate the deciphered length of hidden AVPsDenys Fedoryshchenko
decode_avp() only checked the 2 bytes length prefix of the Hidden AVP Subformat when the ciphered attribute spanned more than one MD5 block. For an attribute of at most 16 bytes it deciphered the single block and returned straight away, leaving l2tp_recv() to take the prefix at face value: orig_avp_len = ntohs(*(uint16_t *)avp->val) + sizeof(*avp); ... attr->length = orig_avp_len - sizeof(*avp); That prefix is an output of the cipher, so a peer which does not know the secret (i.e. anyone able to reach the L2TP socket, no handshake needed beyond a preceding Random-Vector AVP) turns it into 16 random bits. Worse than an over-read: orig_avp_len is a uint16_t, so a prefix of 0xffff wraps to 5, attr->length becomes -1, and the ATTR_TYPE_STRING and ATTR_TYPE_OCTETS cases then run attr->val.string = _malloc(attr->length + 1); /* _malloc(0) */ memcpy(attr->val.string, orig_avp_val, attr->length); /* SIZE_MAX */ that is an unbounded memcpy() into a zero sized allocation. Remotely triggerable heap corruption on any tunnel with a secret configured. The accel-ppp encoder always pads hidden AVPs by at least 16 bytes, so it never produces an attribute short enough to reach this path; only a crafted packet does. Fix it at the source rather than at the call site: decode_avp() now returns the deciphered length through an output parameter, and the length is bounded against the room actually available in the received AVP on every path out of the function, single block included. Callers can no longer re-derive it from the AVP body and get it wrong, and the existing multi-block check keeps guarding the deciphering loop itself. Add packet_test.c, a standalone test which drives the real parser through a real UDP socket: hand-crafted packets cover the length prefix checks (including the boundaries of what fits and the single block path the encoder cannot produce), and l2tp_packet_send()/l2tp_recv() round trips cover the multi-block cipher and the unaligned AVP accessors. It reproduces the corruption above under ASan on unpatched code. Wire it, and the so far unused bitpool_test.c, into the ASAN/UBSAN workflow. Inspired by the equivalent hardening in accel-ppp-ng (commit a8ca0f3f), which bounds the length at the call site; the fix here is placed inside decode_avp() and covered by a regression test.
2026-08-08ci: survive the negative branch counters gcov reportsDenys Fedoryshchenko
The coverage job fails while gcovr reads the data for triton.c: Unrecognized GCOV output ... branch 2 taken -1 NegativeHits: Got negative hit value in gcov line 'branch 2 taken -1' gcov emits those now and then, it is gcc bug 68080 and not something the source can avoid. gcovr 6 and later treat it as a fatal parse error unless --gcov-ignore-parse-errors names the case to tolerate. Passing that option unconditionally is not enough, since the job runs on both ubuntu-24.04 and ubuntu-22.04 and the gcovr in the latter predates it and takes no value. Ask gcovr whether it knows the option before adding it, and print what was decided so the log says which one ran.
2026-08-08ipoe: include net/rtnetlink.h, insert modules in ci even after a failureDenys Fedoryshchenko
rtnl_link_register() and struct rtnl_link_ops were reaching the driver through some other header rather than through net/rtnetlink.h, which is the kind of thing that only shows up when building against a different kernel. Include it directly. The workflows insert the kernel modules between two pytest runs, and the runs that follow are marked 'if: always()' while the insmod steps are not. A failure in an earlier, unrelated test therefore skips the insmod but still runs the tests that need the module, which then report a missing driver instead of the original problem. Mark the insmod steps 'if: always()' as well, so that the later runs test what they are supposed to.
2026-08-05sstp: add ppposeq transport to avoid userspace HDLC framingsstp-ppposeqVladislav Grishenko
A pty is a byte stream, so the tty flip buffer merges frames written back to back and sstp has to re-delimit them with async HDLC escaping and a CRC-16 FCS. On a 1452-byte payload that is ~3600 ns per frame, most of it spent on the FCS. PPPOSEQ is a pppox protocol whose socket is the ppp endpoint itself, so one datagram is one frame and no framing is needed at all. The same payload takes ~380 ns per frame, about 9 times less. Requires kernel 2.6.37, the first with PX_MAX_PROTO 3, whose remaining slot it claims. Supported kernels are from 2.6.37 to 7.2. The new ppp-mode option selects the transport; auto, the default, falls back to async when the module is unavailable, so hosts with prebuilt kernels are unaffected. PPP_SYNC is removed, being disabled and unfixable over a pty: frame boundaries cannot be recovered from the stream, and coalescing cannot be prevented since frames arrive from the network stack.
2026-06-10ci: harden s390x qemu test against modloop/disk flakesDenys Fedoryshchenko
The s390x netboot initramfs ships virtio_net but not virtio_blk; the block driver only becomes available after the modloop image is downloaded over the network at boot. When that download fails, sshd still comes up but /dev/vda never appears and setup-disk dies with "/dev/vda is not a block device suitable for partitioning". - Wait for /sys/block/vda/device before running setup-alpine, restarting the modloop and hwdrivers services on each retry. - Log the QEMU console (screen -L) for both VM launches and dump the logs at the end of the job, so failures of the second boot (the other recurring flake, where ssh never comes back after reboot) are debuggable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-05-04ci: Tightening warning condition in dmesg checksDenys Fedoryshchenko
The boot-time RETBleed: WARNING: Spectre v2 mitigation... line matches the broad WARNING: regex. The intent of that pattern was to catch kernel WARN_ON() splats, which always begin with WARNING: CPU:. We can tighten checks, to avoid false positive. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-02ci: fail workflows on kernel issues found in dmesgDenys Fedoryshchenko
Recently i wasted several hours searching bug in workflows/userspace. Turned out in dmesg we had highly visible WARNING that we dont watch. After each test run, dump dmesg and grep for canonical kernel-issue markers (WARNING, BUG, Oops, kernel panic, GPF, KASAN, kernel UBSAN, soft/hard lockup, hung tasks, bad page state, invalid opcode). Fail the job if any are present, with a GitHub Actions error annotation. Until now, kernel WARNs from out-of-tree drivers (e.g. vlan_mon tripping the new ETH_P_ALL ptype_head WARN_ON in 6.6+) were silently swallowed by the existing 'Display processes and dmesg after tests' steps -- visible only if a human inspected the log. The check runs with if: always() so it triggers both on test failure and on test completion. Applied to all four workflows that load kernel modules: run-tests-asan-ubsan.yml, run-tests.yml (Test-in-Qemu, Test-in-Alpine, Test-in-GH, Test-in-GH-Coverage), run-tests-32bit.yml, and run-tests-bigendian.yml. P.S. Some whitespace churn included. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2025-08-19ci: add tests execution with asan and ubsanSergey V. Lobanov
2025-08-15ci: add build in debian:forky containerSergey V. Lobanov
2025-07-03ci: add fedora:rawhide build to build with latest kernelSergey V. Lobanov
2025-06-13ci: remove ubuntu 20 builds due to EOL of Standard SupportSergey V. Lobanov
2025-05-07Merge pull request #239 from nuclearcat/fix-testsSergey V. Lobanov
(workflows): Ubuntu 20.04 is deprecated, removing it
2025-05-02(workflows): Ubuntu 20.04 is deprecated, removing itDenys Fedoryshchenko
This tests failing now with following message: ``` This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see https://github.com/actions/runner-images/issues/11101 ``` Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2024-12-11ci: update alpine linksSergey V. Lobanov
2024-12-01ci: run tests on x86_32 platform (alpine vm)Sergey V. Lobanov
2024-11-29Merge pull request #218 from svlobanov/be-ci-fix-libpcreDmitriy Eshenko
ci: fix build on alpine be (s390x)
2024-11-28Merge pull request #220 from svlobanov/ci-ubuntu-develSergey V. Lobanov
ci: add build in ubuntu:devel container
2024-11-28ci: fix build on alpine BE (s390x)Sergey V. Lobanov
bump libpcre, disable chap_secrets in tests
2024-11-28ci: add build in ubuntu:devel containerSergey V. Lobanov
Building in ubuntu:devel container might help to find the issues related to newest kernels and other software updates
2024-11-28tests,ci: disable chap-secrets related tests on alpineSergey V. Lobanov
radius and chap-secrets can't work together due to musl library limiations This patch disables chap-secrets related tests on alpine ref: https://github.com/accel-ppp/accel-ppp/pull/190#issuecomment-2331036461
2024-11-20Merge pull request #182 from svlobanov/be-ci2Denys Fedoryshchenko
ci: run tests on alpine s390x (big-endian)
2024-10-27ci: fix testing on debian13 (pytest install issues)Sergey V. Lobanov
2024-09-02ci: change libpcre to libpcre2Sergey V. Lobanov
2024-08-26ci: run tests on alpine s390x (big-endian)Sergey V. Lobanov
s390x is the only big-endian platform supported by major Linux vendors. Alpine s390x is the only major distro that includes pppoe kernel module. Ubuntu, Debian, RHEL (and Fedora) removed pppoe from kernel config so alpine s390x is used. Alpine doesn't provide cloud-image for s390x that is why netboot installed is used. It is almost zero probability that someone will run accel-ppp on s390x IBM mainframe, but testing on big-endian platform is useful for another platforms (e.g. mips-be and ppc-be which is still in use on home gateways and supported by openwrt).
2024-08-23ci: run tests in alpine vmSergey V. Lobanov
Alpine Linux uses musl libc so now accel-ppp is tested under musl Currently, Alpine Linux doesn't provide a link to the latest stable version so direct link to Alpine 3.20 is used Improved musl support might be used to run on platforms like openwrt without additional patches
2024-08-22Merge pull request #176 from svlobanov/ci-gentooDenys Fedoryshchenko
ci: add build in gentoo container
2024-08-19tests: fix execution orderSergey V. Lobanov
2024-08-18ci: add build in gentoo containerSergey V. Lobanov
2024-08-17ci: speedup virtual machines using kvm and host cpu passthroughSergey V. Lobanov
github now allows kvm and cpu passthrough, enable it to speedup ci
2024-07-02ci: remove debian10 supportSergey V. Lobanov
Debian10 LTS is EoL (ref: https://wiki.debian.org/LTS) so it is removed from CI. Debian10 ELTS is maintained by third-party organization, only some packages are maintained so there is no reason to support Debian10 in CI
2024-05-25ci: use ubuntu 24.04 as default runner in githubSergey V. Lobanov
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2024-04-14Merge pull request #130 from nuclearcat/add-musl-compatibilityDmitriy Eshenko
musl: Add musl compatibility
2024-04-12ci: remove unnecessary gcovr python package where it's not requiredSergey V. Lobanov
This patch fixes debian10 build Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2024-04-10workflows: Add CI build in AlpineDenys Fedoryshchenko
As we fixed musl compatibility, we can add also basic check if accel keep working in Alpine Linux Also update default config, enable connlimit and place it before pptp, otherwise Alpine generate error: ``` [2024-04-09 22:30:09.911]loader: failed to load 'pptp': Error relocating /usr/local/lib64/accel-ppp/libpptp.so: connlimit_check: symbol not found ``` Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2024-03-20ci: fix pytest issue on Debian 10Sergey V. Lobanov
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2023-12-29ci: add ubuntu 24.04 support, disable mainline kernel buildSergey V. Lobanov
third-party mainline ubuntu kernel package is broken so disable it
2023-10-06ci: add build for mainline kernelSergey V. Lobanov
2023-10-05ci: fix debian13 image (use explicit name 'trixie' instead of sid)Sergey V. Lobanov
2023-10-03ci: disable vlan-mon related tests on Debian10Sergey V. Lobanov
2023-07-17ci: add support for Debian 13 (trixie)Sergey V. Lobanov
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2023-04-01ci: fix python packages installation on debian12Sergey V. Lobanov
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2023-04-01ci: remove support for Ubuntu 18.04 as EOLSergey V. Lobanov
Ubuntu 18.04 is EOL so CI support is not necessary anymore Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>