Commit Graph

63716 Commits

Author SHA1 Message Date
Cedric DOURLENT
8eaacac69a
build: add support for checksec.sh based mitigation reports
Checksec is a bash script to check the properties of executables (like
PIE, RELRO, Canaries, ASLR, Fortify Source).

Add an optional build feature, which when enabled is going to create a
JSON report about the state of mitigations in the produced binaries.

Upstream-Status: Submitted [https://github.com/openwrt/openwrt/pull/14569]
Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
2025-07-31 15:20:37 +00:00
Cedric DOURLENT
4f09b50710
tools: checksec.sh: improve fortify check results
We need to extend checksec.sh fortify check to get more details about
the results for "not available" case.  pick

Upstream-Status: Submitted [https://github.com/openwrt/openwrt/pull/14569]
Upstream-Status: Submitted [https://github.com/slimm609/checksec.sh/pull/230]
Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
2025-07-31 15:20:36 +00:00
Cedric DOURLENT
d518efbf82
tools: add checksec.sh mitigation scanner
Checksec is a bash script to check the properties of executables (like
PIE, RELRO, Canaries, ASLR, Fortify Source).  We're going to use it for
reports later.

Upstream-Status: Submitted [https://github.com/openwrt/openwrt/pull/14569]
Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
2025-07-31 15:20:35 +00:00
Matthias FRANCK
c032783471
ci: testbed: run cram tests manually
Every time we make a build, the cram tests are executed automatically.
Because of this, tests are often excecuted while not needed and test
capacity is occupied for nothing.

Let's adapt this so that we manually need to trigger the test jobs if we
would like to excecute cram tests.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:34 +00:00
Matthias FRANCK
803f205f39
ci: testbed-cdrouter.py: fix re.sub decode issue by passing utf-8 string
When running the changes done in commit 140ad37e2ab0 ("cdrouter:
wireless: make wifiBeaconPhy configurable"), we can see:

Traceback (most recent call last):
  File ".gitlab/scripts/testbed-cdrouter.py", line 441, in <module>
    main()
  File ".gitlab/scripts/testbed-cdrouter.py", line 437, in main
    args.func(cdr)
  File ".gitlab/scripts/testbed-cdrouter.py", line 345, in config_import
    content = self.replace_env_config_variables(content)
  File ".gitlab/scripts/testbed-cdrouter.py", line 330, in replace_env_config_variables
    text = re.sub(pattern, value, text)
  File "/usr/lib/python3.7/re.py", line 192, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object

The re.sub() command fails because a non utf-8 encoded string is
passed. Let's therefore adapt the method that is called for opening a
file to always return a utf-8 decoded string.

Fixes: 140ad37e2ab0 ("cdrouter: wireless: make wifiBeaconPhy configurable")
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:33 +00:00
Matthias FRANCK
bef6276786
cdrouter: wireless: make wifiBeaconPhy configurable
With the new wnc-freedom wifi7 box, the wifiBeaconPhy testvar of CDRouter needs to include "be" as well. Let's make this configurable in the CI by introducing a CDROUTER_CONFIG_WIFI_BEACON_PHY variable that can be set uniquely for every box.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:32 +00:00
Matthias FRANCK
049d0acfc3
ci: 060-xpon-mock.t: install mod-xpon-prpl-mock from feed_net_core
The mod-xpon-prpl package was moved to feed_net_core, so let's use the
mock package coming from this feed as well.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:31 +00:00
Yüce Kürüm
00736cc1af
ci: cram: ubus-datamodel.t: add amx-faultmonitor and reboot-service
amx-faultmonitor and reboot-service are new components that have been
introduced for prplos 3.1 release. Recently a Device. mapping was added
to the components:
a92bd2ca60
d29c365762

Let's update the test for the newly added Device. mappings.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:30 +00:00
Matthias FRANCK
17d3534034
PROVISORY: ci: build: increase build timeout to 2 hours
The default timeout of one hour is not sufficient anymore. We regularly
see timeouts because build times are exceeding this one hour time limit.

So lets workaround it by increasing the build timeout to 2 hours.

References: PCF-1342
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:29 +00:00
Matthias FRANCK
0bc514bf58
ci: ubus-datamodel-list.t: extend datamodel test with mcastd entries
The mcastd features were added, so let's update the datamodel tests to
include mcastd related entries.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:28 +00:00
Johan Jacobs
3e25cf5613
amxb_usp: use latest release version and update configuration
Sets CONFIG_SAH_MOD_AMXB_USP_REQUIRES_DEVICE_PREFIX=y to ensure all
requests contain a Device prefix before they are sent to avoid
communication overhead.

Signed-off-by: Johan Jacobs <johan.jacobs_ext@softathome.com>
2025-07-31 15:20:27 +00:00
Yüce Kürüm
00598f7464
ci: tests: 100-captiveportal.t: rework captive portal cram test
Because of the changed output of ba-cli, outputs are not correctly
selected.
Update the test with the new format.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:26 +00:00
Yüce Kürüm
2e2fd3200b
ci: cram: add test for tr181-dnssd
There are no tests for checking the DNS Service Discovery functionality.
In order to properly test tr181-dnssd we need to extract the services
from the responses.

`nmap -sU --script=dns-service-discovery -p5353 192.168.1.1` is supposed
to that, but advertised services don't show up in the command output.
We can still see them in the packet capture:
14:40:31.631478 IP 192.168.1.2.53064 > 192.168.1.1.5353: 0 PTR (QM)? _services._dns-sd._udp.local. (46)
14:40:31.634862 IP 192.168.1.1.5353 > 224.0.0.251.5353: 0*- [0q] 1/0/0 A 192.168.1.1 (44)
14:40:31.634862 IP 192.168.1.1.5353 > 224.0.0.251.5353: 0*- [0q] 1/0/0 PTR _mqtt._tcp.local. (70)
14:40:31.634862 IP 192.168.1.1.5353 > 224.0.0.251.5353: 0*- [0q] 1/0/0 PTR prplOS.lan._mqtt._tcp.local. (69)
14:40:31.634862 IP 192.168.1.1.5353 > 224.0.0.251.5353: 0*- [0q] 2/0/0 SRV prplOS.lan.local.:0 1648 29296, TXT "From=sah" (123)

Until we can find a way to properly check the advertised services, let's
at least make sure that the basic functionality is there.

For this purpose:
- Check DM entry.
- Check firewall rules
- Check if service responds

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:25 +00:00
Mohammed SI ALI
bcd1eac75c
ci: cram test: osp v1: remove double check on SSIDs
configure interfaces as configured by mxl

also remove pgrep to hostapd process

Signed-off-by: Mohammed SI ALI <mohammed.siali@softathome.com>
2025-07-31 15:20:24 +00:00
Mohammed SI ALI
98534af176
ci: cram test: wnc-freedom: remove double check on SSIDs
also remove pgrep to hostapd process as that returns the actual process that can't be predicted

Signed-off-by: Mohammed SI ALI <mohammed.siali@softathome.com>
2025-07-31 15:20:23 +00:00
Mohammed SI ALI
50c98a662a
Issue: PPW-26 [prplos 23.05][CRAM] Failing wifi test
* remove wlan2.2 interface as there's no endpoint deployed here

PS: this will be discussed in PPW-18 and from there we will adapt test configuration to whatever will be the right way of doing things.

Signed-off-by: Mohammed SI ALI <mohammed.siali@softathome.com>
2025-07-31 15:20:22 +00:00
Yüce Kürüm
226315bbf5
ci: cram: 025-process-monitor.t: restore correct CurrentTestInterval
CurrentTestInterval was being overwritten during the test blindly.
Save the CurrentTestInterval value so it can be restored at the end of
the test.

Also process check time can vary depending on the test count. This might
become a problem if test counts increase. Instead of waiting for a fixed
timeout, let's calculate reactivation_timeout with current test count
and use that as a timeout for process restart.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:21 +00:00
Yüce Kürüm
49fc5fab36
ci: cram: add tests for processfaults-monitor, mqttbroker and reboot-service
New CRAM tests are for following packages:
- amx-faultmonitor
- reboot-service
- tr181-mqttbroker

Here are short descriptions of what the new tests are doing
amx-faultmonitor:
- Get a list of current fault entries.
- Start a dummy process and cause it to crash with kill -SEGV
- Get a new list of fault entries and remove previous entries.
- Check new entries ProcessName to make sure it was the process that was
being tested.
- Check new entries ProcessID to make sure it was the process that was
being tested.
- Check if a core dump has been generated.
- If the dummy process was the only entry in Fault Monitor, test
ProcessFaults.RemoveAllProcessFaults() functionality by calling the
function and checking if the core dump is removed.

reboot-service:
Because it is problematic to reboot the device during the tests, only
the DM entries are checked.
- Check Reboot. DM entry.
- Test Reboot.flush() functionality by calling the function and making
sure the reboot entry is removed from the DM.

tr181-mqttbroker:
- Check if default brokers are running and ports are configured in
firewall.
- Subscribe to a topic in background with a 5s time limit.
- Publish a message and check if message has been received.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:20 +00:00
Yüce Kürüm
41aa7f0ef2
CI: cram: disable QoS by default
tr181-qos default configurations have been disabled by default.

Enable required configurations before each test and cleanup at the end.

References: PCF-1250
Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:20:19 +00:00
Mouna ALOUI
4de311cb4a
profiles: prpl: make cwmpd agent obuspa compatible
Configure TR-069 agent cwmpd to use the amxb_get_supported() method
instead of amxb_describe().  The amxb_describe() method is deprecated
and should be fully replaced by amxb_get_supported().

Signed-off-by: Mouna ALOUI <mouna.aloui_ext@softathome.com>
2025-07-31 15:20:18 +00:00
Matthias FRANCK
994c915bf3
ci: tests: ubus-datamodel-list: add missing DNSSD.Advertise entry
Signed-off-by: Matthias FRANCK <matthias.franck_ext@softathome.com>
2025-07-31 15:20:17 +00:00
Matthias FRANCK
7bc0f1b69c
profiles: prpl: use upstream syslog-ng package instead of syslog-ng2
syslog-ng was backported to feed-prpl and the following patch/change was
done in b1033c327b

This change has no effect anymore, since the complete syslog-ng.conf
file is now controlled/generated by tr181-syslog, so lets use upstream
syslog-ng package again.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:16 +00:00
Matthias FRANCK
292868619c
ci: cram: usermanagement: enable user when creating the user
Since the user is not enabled, it cannot access the box over ssh. This
makes the usermanagement test fail, since we test the user by trying to
ssh into the box.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:15 +00:00
Toon Caeyers
5ef13146e9
ci: cram: NAT portmapping interface now requires Device path
To be compliant with  TR181 spec, the interface parameter should only take device parameters

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:14 +00:00
Toon Caeyers
802c0a393c
ci: cram: update expected number of entries in packet interception
New entries were added in newer version of the component
Output changed when switching to OpenWRT 23

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:13 +00:00
Toon Caeyers
b7c5d05263
ci: cram: update firewall test
Update test with better quotation

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:12 +00:00
Matthias FRANCK
bbfa854b5f
profiles: prpl: enable mod-dnssd-advertisement
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:11 +00:00
Matthias FRANCK
879a521385
profiles: prpl: enable dmtui
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:10 +00:00
Matthias FRANCK
61a4d2c76c
profiles: prpl: enable mcastd features
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:09 +00:00
sah0447
b719ed3dc2
ci: cram: Remove check if netifd is running
* netifd is no longer used so should also not be running anymore

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:08 +00:00
sah0447
eadd3b45d9
ci: cram: update expected DHCPv6Server lcm values
* DHCPv6Server defaults are now generated and are the same for all bridges

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:07 +00:00
sah0447
c8d2576d92
ci: cram: Add diagnostics object to DNS
* The DM of DNS.Diagnostics.NSLookupDiagnostics. is added to the tr181-dns component, test should be updated as well

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:06 +00:00
sah0447
2745791a0a
ci: cram: Remove ping test on wan
Issue: Ping to wan no longer works

Cause: Firewall config was changed to no longer allow ping to wan by default

Fix: Remove wan ping test

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:05 +00:00
sah0447
199fd57981
ci: cram: A time server is not created for every bridge
* The default changed to now have a time server instance for every bridge defined in the network layout
* Adds the missing output for br-lcm

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:04 +00:00
sah0447
ad689714a0
ci: cram: prevent lower level Alias parameters polluting the test
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:04 +00:00
sah0447
046126da14
ci: cram: Update firewall service test
* Add a new test that will test toggling the instance instead of removing/adding it
* Replace the aliassed instance with a search expression to make it more robust

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:03 +00:00
sah0447
dda2876608
ci: cdrouter: enable wifi 7 as expected beacon
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:02 +00:00
Matthias FRANCK
351c5aa693
Revert "ci: cdrouter: enable ipv6WanPingRespond config option"
The default behavior is changed. We don't want to respond to ping6 WAN requests anymore.

This reverts commit 0dd60b27ebf0a61e330dc574eaa435b6a6461dec.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:01 +00:00
Matthias FRANCK
8ac6fcfba2
profiles: prpl: add tr181-mqttbroker
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:00 +00:00
Matthias FRANCK
9ca578e2b0
profiles: prpl: add reboot-service
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:59 +00:00
Matthias FRANCK
ae84433a95
profiles: prpl: add amx-faultmonitor
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:58 +00:00
Matthias FRANCK
b77eb10e30
profiles: prpl: add gmap-mibs-common
Needed for gmap to work properly

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:57 +00:00
Yüce Kürüm
97eaa16528
ci: cdrouter: flush DNS cache before cdrouter tests start
Instead of reducing unbound negative cache ttl try to flush it just before the tests start.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:19:56 +00:00
Yüce Kürüm
06c1f0bba4
ci: cdrouter: update dynamicdns server index
'uci_dyndns.org' server index has changed in OpenWRT 23.05. Adapt the initialization script accordingly.

Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
2025-07-31 15:19:55 +00:00
Matthias FRANCK
021ffd5bce
profiles: prpl: use prpl variant for some opensource packages
Modifications to some opensource packages were made. These packages are available under a different name (suffixed with -prpl).

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:54 +00:00
Matthias FRANCK
e7a51f0422
profiles: prpl: disable usermanagement password hashed format storage
This allows us to set an empty ssh password.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:53 +00:00
Matthias FRANCK
a39a4c4ef8
profiles: prpl: use latest SAH feeds
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:52 +00:00
Matthias FRANCK
a136d9ef36
netifd: disable netifd
Netifd is not longer responsible for configuring the gateway. The TR181 components took over this task.

Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:19:51 +00:00
Petr Štetiar
582f3a8458
ci: cram: check-for-crashes.t: make it really execute as the last test
Since we're running DUT specific tests after generic tests, its
possible, that some of them trigger crashes in the components, so we
really need to make sure, that check-for-crashes.t test is being run as
last one, thus move it under generic/post folder and make it run after
all tests via new `CRAM_TEST_SUITE_POST` environment variable.

Fixes: 7a5c6289e6be ("ci: cram: check-for-crashes.t: make it execute as the last test")
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:19:50 +00:00
Petr Štetiar
3a444050ee
ci: testbed: OSPv1: cleanup LCM data partition during flashing
There is now dedicated LCM data partition mounted under /lcm which is
not cleared up after each test, thus containers used in previous tests
persist during the DUT reboot and flashing procedure, violating test
imdepotence and making consecutive test fail.

So lets fix it by clearing up the LCM data partition during DUT firmware
flashing procedure, clearing just ext4 filesystem metadata, not erasing
complete 3 GiB and saving some time.

 20     0x000f6800      0x006f67ff      "lcm_data"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   c5cde408-0b88-48ba-8701-eed060c51309

The 0xf6800 is the starting eMMC block of that partition and 0x400 is
eMMC erase group size, thus minimal size we can erase.

References: PCF-1101, PCF-1267
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:19:49 +00:00