Skip to contentSkip to conversation

Roll up outstanding fixes

PATCH In review Scott Murray 3 participants 37 messages Nov 23, 2025 – Nov 24, 2025

lore
Share & tools
lore
#0 lore raw

cover Roll up outstanding fixes

This patch series attempts to get scarthgap branch back into a usable state. These changes are on the scarthgap-next branch of meta-security, and my plan is to merge them to scarthgap branch at the end of day Tuesday (EST).

It includes:
- All the outstanding patches to the mailing list that I could find, barring one duplicate python3-fail2ban update that did not apply and had a newer alternative available.
- Changes to get the gitlab CI test pipelines to the same state as master (i.e. build tests all passing).
- Selected backports of other changes from master that seemed appropriate.

Things to note:
- I chose to keep all the suricata and libhtp CVE fixes history even though I've backported 7.0.12 and 0.5.52 updates on top, since I figure this approach makes it easier to check if a patch submission was missed. Plus, I'm lazy, and didn't feel like squashing all that away after I was done testing.
- Going forward, I would prefer suricata and libhtp upgrades over accruing a large set of CVE patches until that stops being feasible for the 7.0.x and 0.5.x versions, respectively. Those should go through master branch first until it has switched to newer major versions (which will be soon for suricata).
- I believe all the backported suricata systemd support changes are effectively fixes, please let me know if I'm missing something and they will break your usecase.
- The packagegroup-core-security change of PACKAGE_ARCH to MACHINE_ARCH is potentially a breaking change if you're using on target package updates (e.g. with dnf or apt), and for some reason using that packagegroup. My guess is that no one uses that packagegroup since it's effectively special purpose for the build test image, but please let me know if this will break something for you.
- There are still some other outstanding CVEs for firejail and clamav. firejail is potentially upgradeable, but clamav is problematic since I believe 0.104.x was already unsupported when scarthgap shipped. If you care about clamav support for scarthgap, plus provide some input on if an upgrade to one of the LTS branches (1.0 or 1.4) is something you would like to see / would be able to help test.

Thanks,

Scott

Changes:

Aidan Stewart (1):
smack: Switch to CVE_STATUS

Armin Kuster (1):
harden-image-minimal: Fix usermod

Chen Qi (1):
libgssglue: switch to use git source

Clayton Casciato (6):
suricata: resolve TMPDIR QA issues in do_configure
suricata: drop pkg_postinst_ontarget systemd init
suricata: fix "interface" arg in systemd service
suricata: install classification, reference configs
suricata: populate SYSTEMD_SERVICE for service autostart
suricata: update to 7.0.12

Haixiao Yan (2):
fail2ban: Adapt test output to Automake format for ptest compatibility
fail2ban: replace fail2ban-python shebang with python3

Hitendra Prajapati (7):
suricata: fix CVE-2024-45795 & CVE-2024-45796
suricata: Fix CVE-2024-55605
clamav: fix CVE-2025-20260
suricata: fix multiple CVEs
libhtp: fix CVE-2025-53537
suricata: Fix multiple CVEs
suricata: fix CVE-2024-55627 && CVE-2024-55628

Marta Rybczynska (7):
CI: update build for new CI
kas: update configuration
scap-security-guide: fix fetch
lynis: update 3.1.1 -> 3.1.4
chkrootkit: use debian mirror
checksecurity: update the debian package
bastille: prevent host uids on files

Rasmus Villemoes (1):
fail2ban: update to 1.1.0+

Scott Murray (4):
Update maintainers
packagegroup-core-security: add missing packages
meta-tpm: Small maintainers fix
ima-evm-utils: remove unnecessary FILESEXTRAPATHS tweak

Yi Zhao (1):
python3-fail2ban: fix ptest failures

akash hadke (1):
meta-security: Remove True option to getVar calls

 .gitlab-ci.yml                                |   47 +-
 README.md                                     |    4 +-
 .../include/maintainers-meta-security.inc     |   72 +-
 .../checksecurity/checksecurity_2.0.16.bb     |    7 +-
 .../bastille/bastille_3.2.1.bb                |    2 +
 ...ges-the-IPs-again.-additionally-it-g.patch |  210 +++
 ...ao.unittest.TestRunner-for-ptest-out.patch |   43 +
 ...case.py-set-correct-config-dir-for-t.patch |   34 +
 ...l2ban_1.0.2.bb => python3-fail2ban_git.bb} |   40 +-
 kas/kas-security-alt.yml                      |    2 +-
 kas/kas-security-base.yml                     |   13 +-
 kas/kas-security-parsec.yml                   |    2 +-
 kas/qemuarm64-musl.yml                        |    1 +
 kas/qemux86-musl.yml                          |    1 +
 kas/qemux86-test.yml                          |    5 +
 meta-hardening/README.md                      |    4 +-
 .../images/harden-image-minimal.bb            |    4 +-
 meta-integrity/README.md                      |    4 +-
 meta-integrity/classes/ima-evm-rootfs.bbclass |    2 +-
 .../ima-evm-utils/ima-evm-utils_1.5.bb        |    2 -
 meta-parsec/README.md                         |    1 -
 .../parsec-service/parsec-service_1.3.0.bb    |    4 +-
 meta-tpm/README.md                            |    4 +-
 .../distro/include/maintainers-meta-tpm.inc   |   32 +-
 .../lynis/{lynis_3.1.1.bb => lynis_3.1.4.bb}  |    2 +-
 .../scap-security-guide_0.1.71.bb             |    2 +-
 .../packagegroup-core-security.bb             |    4 +
 ...kefile-from-using-its-own-rust-steps.patch |   40 +
 .../suricata/files/CVE-2024-45797.patch       |  148 --
 recipes-ids/suricata/files/fixup.patch        |   32 -
 recipes-ids/suricata/files/suricata.service   |    2 +-
 .../{libhtp_0.5.45.bb => libhtp_0.5.52.bb}    |    6 +-
 recipes-ids/suricata/suricata-crates.inc      | 1509 ++++++++---------
 .../{suricata_7.0.0.bb => suricata_7.0.12.bb} |   27 +-
 recipes-mac/smack/smack_1.3.1.bb              |    7 +-
 recipes-scanners/clamav/clamav_0.104.4.bb     |    1 +
 .../clamav/files/CVE-2025-20260.patch         |  366 ++++
 recipes-scanners/rootkits/chkrootkit_0.57.bb  |    2 +-
 recipes-security/libgssglue/libgssglue_0.8.bb |    5 +-
 39 files changed, 1612 insertions(+), 1081 deletions(-)
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch
 rename dynamic-layers/meta-python/recipes-security/fail2ban/{python3-fail2ban_1.0.2.bb => python3-fail2ban_git.bb} (63%)
 rename recipes-compliance/lynis/{lynis_3.1.1.bb => lynis_3.1.4.bb} (93%)
 create mode 100644 recipes-ids/suricata/files/0001-Skip-pkg-Makefile-from-using-its-own-rust-steps.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-45797.patch
 delete mode 100644 recipes-ids/suricata/files/fixup.patch
 rename recipes-ids/suricata/{libhtp_0.5.45.bb => libhtp_0.5.52.bb} (82%)
 rename recipes-ids/suricata/{suricata_7.0.0.bb => suricata_7.0.12.bb} (82%)
 create mode 100644 recipes-scanners/clamav/files/CVE-2025-20260.patch
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/32 Update maintainers

Add Marta and myself as maintainers for meta-security and the other embedded layers that Armin had been maintaining. To avoid Armin getting bugged about individual recipes, set the RECIPE_MAINTAINER variables to myself.

(backport from master)

---
 README.md                                     |  4 +-
 .../include/maintainers-meta-security.inc     | 72 +++++++++----------
 meta-hardening/README.md                      |  4 +-
 meta-integrity/README.md                      |  4 +-
 meta-parsec/README.md                         |  1 -
 meta-tpm/README.md                            |  4 +-
 .../distro/include/maintainers-meta-tpm.inc   | 33 +++++----
 7 files changed, 64 insertions(+), 58 deletions(-)
README.md +3 -1
index 3e092a9..c657d15 100644
@@ -83,7 +83,9 @@ Now you can just do 'git send-email origin/master' to send all local patches.
 
 For pull requests, please use create-pull-request and send-pull-request. 
 
-Maintainers:    Armin Kuster <[email protected]>
+Maintainers:
+Scott Murray <[email protected]>
+Marta Rybczynska <[email protected]>
 
 
 License
conf/distro/include/maintainers-meta-security.inc +36 -36

75 lines not on this page · raw message

meta-hardening/README.md +3 -1
index cc39ca4..36f269a 100644
@@ -76,7 +76,9 @@ $ git config format.subjectPrefix meta-hardening][PATCH
 
 Now you can just do 'git send-email origin/master' to send all local patches.
 
-Maintainers:  Armin Kuster <[email protected]>
+Maintainers:
+Scott Murray <[email protected]>
+Marta Rybczynska <[email protected]>
 
 License
 =======
meta-integrity/README.md +3 -1
index c333a9f..191b8e4 100644
@@ -45,7 +45,9 @@ [email protected] mailing list. When submitting patches that way,
 make sure to copy the maintainer and add a "[meta-integrity]"
 prefix to the subject of the mails.
 
-Maintainer: Armin Kuster <[email protected]>
+Maintainers:
+Scott Murray <[email protected]>
+Marta Rybczynska <[email protected]>
 
 
 Table of Contents
meta-parsec/README.md +0 -1
index 785c932..9dea718 100644
@@ -257,7 +257,6 @@ $ git config format.subjectPrefix meta-parsec][PATCH
 Now you can just do 'git send-email origin/master' to send all local patches.
 
 Maintainers:    Anton Antonov <[email protected]>
-                Armin Kuster <[email protected]>
 
 
 License
meta-tpm/README.md +3 -1
index 983c753..523b284 100644
@@ -69,7 +69,9 @@ $ git config format.subjectPrefix meta-security][PATCH
 
 Now you can just do 'git send-email origin/master' to send all local patches.
 
-Maintainers:    Armin Kuster <[email protected]>
+Maintainers:    
+Scott Murray <[email protected]>
+Marta Rybczynska <[email protected]>
 
 
 License
meta-tpm/conf/distro/include/maintainers-meta-tpm.inc +16 -17
index e7b216d..829f198 100644
@@ -19,20 +19,19 @@
 #	RECIPE_MAINTAINER:pn-<recipe name> = "Full Name <address@domain>"
 #
 # Please keep this list in alphabetical order.
-RECIPE_MAINTAINER:pn-aircrack-ng = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-pcr-extend = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm-quote-tools = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-libtpm = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-trousers = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-swtpm = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-openssl-tpm-engine = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm-tools = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-abrmd = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-totp = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-tcti-uefi = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-tss-engine = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-pkcs11 = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-tss = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-tpm2-tools = "Armin Kuster <[email protected]>"
-RECIPE_MAINTAINER:pn-ibmswtpm2 = "Armin Kuster <[email protected]>"
-
+RECIPE_MAINTAINER:pn-aircrack-ng = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-pcr-extend = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm-quote-tools = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-libtpms = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-trousers = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-swtpm = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-openssl-tpm-engine = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm-tools = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-abrmd = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-totp = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-tcti-uefi = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-tss-engine = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-pkcs11 = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-tss = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-tpm2-tools = "Scott Murray <[email protected]>"
+RECIPE_MAINTAINER:pn-ibmswtpm2 = "Scott Murray <[email protected]>"
Signature · 1 line
2.47.3
#2 lore raw

PATCH 2/32 CI: update build for new CI

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

Update for Ubuntu 24.04 runners:
- use venv for installing kas
- add missing directories
- assume that python3 and pip are installed.

Other changes:
- add logging of jobs to files
- build parsec images where appropriate

(squashed and updated with missing master version changes)

---
 .gitlab-ci.yml | 47 +++++++++++++++++++++++++++--------------------
 1 file changed, 27 insertions(+), 20 deletions(-)
.gitlab-ci.yml +27 -20
index 1e82a87..5e15221 100644
@@ -1,10 +1,13 @@
 .before-my-script: &before-my-script
     - echo "$ERR_REPORT_USERNAME" > ~/.oe-send-error
     - echo "$ERR_REPORT_EMAIL" >> ~/.oe-send-error
+    - echo "$CI_PROJECT_DIR" >> ~/.ci_project_dir
     - export PATH=~/.local/bin:$PATH
-    - wget https://bootstrap.pypa.io/get-pip.py
-    - python3 get-pip.py
+    - python3 -m venv ~/kas_env/
+    - source ~/kas_env/bin/activate
     - python3 -m pip install kas
+    - mkdir -p $CI_PROJECT_DIR/build/tmp/log/error-report/
+    - mkdir -p $CI_PROJECT_DIR/log/
 
 .after-my-script: &after-my-script
     - cd $CI_PROJECT_DIR/poky
@@ -26,6 +29,10 @@ stages:
   stage: base 
   after_script:
     - *after-my-script
+  artifacts:
+    paths:
+      - $CI_PROJECT_DIR/log/*
+    when: always
 
 .parsec:
   before_script:
@@ -51,77 +58,77 @@ stages:
 qemux86:
   extends: .base
   script:
-  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image integrity-image-minimal"
-  - kas build --target harden-image-minimal kas/$CI_JOB_NAME-harden.yml
+  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image integrity-image-minimal" 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_security_image.txt
+  - kas build --target harden-image-minimal kas/$CI_JOB_NAME-harden.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_harden_image.txt
 
 qemux86-musl:
   extends: .musl
   needs: ['qemux86']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-build-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_musl_security_image.txt
 
 qemux86-parsec:
   extends: .parsec
   needs: ['qemux86']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-parsec-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_parsec_security_image.txt
 
 qemux86-test:
   extends: .test
   needs: ['qemux86']
   allow_failure: true
   script:
-  - kas build --target security-test-image kas/$CI_JOB_NAME.yml
-  - kas build -c testimage --target security-test-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-test-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_test_security_image.txt
+  - kas build -c testimage --target security-test-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_testimage_security_image.txt
 
 qemux86-64:
   extends: .base
   script:
-  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image security-tpm-image security-tpm2-image integrity-image-minimal"
-  - kas build --target dm-verity-image-initramfs kas/$CI_JOB_NAME-dm-verify.yml
-  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml
+  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k core-image-minimal security-build-image security-tpm-image security-tpm2-image integrity-image-minimal" 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_64_security_image.txt
+  - kas build --target dm-verity-image-initramfs kas/$CI_JOB_NAME-dm-verify.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_64_dm_verify.txt
+  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_64_security_build_image.txt
 
 qemux86-64-parsec:
   extends: .parsec
   needs: ['qemux86-64']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-parsec-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemux86_64_parsec_security_image.txt
 
 qemuarm:
   extends: .base
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-build-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm_security_image.txt
 
 qemuarm-parsec:
   extends: .parsec
   needs: ['qemuarm']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-parsec-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm_parsec_security_image.txt
 
 qemuarm64:
   extends: .base
   script:
-  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image security-tpm2-image integrity-image-minimal"
-  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml
+  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image security-tpm2-image integrity-image-minimal" 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm64_parsec_security_image.txt
+  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm64_build_security_image.txt
 
 qemuarm64-musl:
   extends: .musl
   needs: ['qemuarm64']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-build-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm64_musl_security_image.txt
 
 qemuarm64-parsec:
   extends: .parsec
   needs: ['qemuarm64']
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-parsec-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuarm64_parsec_security_image.txt
 
 qemumips64:
   extends: .base
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-build-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemumips64_security_image.txt
 
 qemuriscv64:
   extends: .base
   script:
-  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
+  - kas build --target security-build-image kas/$CI_JOB_NAME.yml 2>&1 | tee $CI_PROJECT_DIR/log/qemuriscv64_security_image.txt
Signature · 1 line
2.47.3
#3 lore raw

PATCH 3/32 kas: update configuration

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

Changes:
- switch to scarthgap
- add required usrmerge feature to kas-security-alt configuration
- add whitespaces around assignement
- add common dldir/sstate
- don't build apparmor in musl configus
- only enable ptest for the test image

(squashed and recent master changes backported)

---
 kas/kas-security-alt.yml    |  2 +-
 kas/kas-security-base.yml   | 13 +++++++++----
 kas/kas-security-parsec.yml |  2 +-
 kas/qemuarm64-musl.yml      |  1 +
 kas/qemux86-musl.yml        |  1 +
 kas/qemux86-test.yml        |  5 +++++
 6 files changed, 18 insertions(+), 6 deletions(-)
kas/kas-security-alt.yml +1 -1
index 3ee9808..8f754ac 100644
@@ -5,4 +5,4 @@ header:
 
 local_conf_header:
   alt: |
-      DISTRO_FEATURES:append = " systemd"
+      INIT_MANAGER = "systemd"
kas/kas-security-base.yml +9 -4
index fa7915c..ff66889 100644
@@ -13,7 +13,7 @@ repos:
 
   poky:
     url: https://git.yoctoproject.org/git/poky
-    refspec: master
+    refspec: scarthgap
     layers:
       meta:
       meta-poky:
@@ -21,7 +21,7 @@ repos:
 
   meta-openembedded:
     url: http://git.openembedded.org/meta-openembedded
-    refspec: master
+    refspec: scarthgap
     layers:
       meta-oe:
       meta-perl:
@@ -36,8 +36,8 @@ local_conf_header:
     INHERIT += "buildstats buildstats-summary buildhistory"
     INHERIT += "report-error"
     IMAGE_CLASSES += "testimage"
-    BB_NUMBER_THREADS="24"
-    BB_NUMBER_PARSE_THREADS="12"
+    BB_NUMBER_THREADS = "24"
+    BB_NUMBER_PARSE_THREADS = "12"
     BB_TASK_NICE_LEVEL = '5'
     BB_TASK_NICE_LEVEL_task-testimage = '0'
     BB_TASK_IONICE_LEVEL = '2.7'
@@ -47,6 +47,7 @@ local_conf_header:
     PACKAGE_CLASSES = "package_ipk"
 
     DISTRO_FEATURES:append = " security pam apparmor smack ima tpm tpm2"
+    DISTRO_FEATURES:remove = "ptest"
     MACHINE_FEATURES:append = " tpm tpm2"
 
   diskmon: |
@@ -60,6 +61,10 @@ local_conf_header:
     HALT,${SSTATE_DIR},100M,1K \
     HALT,/tmp,10M,1K"
 
+  dlsstate: |
+    DL_DIR = "/home/gitlab-runner/build/downloads"
+    SSTATE_DIR = "/home/gitlab-runner/build/sstate-cache"
+
 bblayers_conf_header:
   base: |
     BBPATH = "${TOPDIR}"
kas/kas-security-parsec.yml +1 -1
index 9a009be..cfaa660 100644
@@ -10,7 +10,7 @@ repos:
 
   meta-clang:
     url: https://github.com/kraj/meta-clang.git
-    refspec: master
+    refspec: scarthgap
 
 local_conf_header:
   meta-parsec: |
kas/qemuarm64-musl.yml +1 -0
index b353eb4..f01f759 100644
@@ -6,5 +6,6 @@ header:
 local_conf_header:
     musl: |
         TCLIBC = "musl"
+        DISTRO_FEATURES:remove = "apparmor"
 
 machine: qemuarm64
kas/qemux86-musl.yml +1 -0
index 61d9572..aa6572c 100644
@@ -6,5 +6,6 @@ header:
 local_conf_header:
     musl: |
         TCLIBC = "musl"
+        DISTRO_FEATURES:remove = "apparmor"
 
 machine: qemux86
kas/qemux86-test.yml +5 -0
index 83a5353..c4609f9 100644
@@ -3,4 +3,9 @@ header:
   includes:
     - kas-security-base.yml
 
+local_conf_header:
+  ptest: |
+      DISTRO_FEATURES:append = " ptest"
+      EXTRA_IMAGE_FEATURES:append = " allow-empty-password allow-root-login empty-root-password"
+
 machine: qemux86
Signature · 1 line
2.47.3
#4 lore raw

PATCH 4/32 scap-security-guide: fix fetch

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

The project does not keep releases in branches, instead they tag them. The stable branch does not contain releases, so we use the revision only.

See upstream issue [1] for details.

[1] https://github.com/ComplianceAsCode/content/issues/13543

---
 .../scap-security-guide/scap-security-guide_0.1.71.bb           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb +1 -1
index 5e45332..e277ccf 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820"
 LICENSE = "BSD-3-Clause"
 
 SRCREV = "459f0abf2ac08d36e5fc4a2619bc75cff7000da9"
-SRC_URI = "git://github.com/ComplianceAsCode/content.git;branch=stable;protocol=https \
+SRC_URI = "git://github.com/ComplianceAsCode/content.git;nobranch=1;protocol=https \
            file://run_eval.sh \
            file://run-ptest \
            "
Signature · 1 line
2.47.3
#5 lore raw

Re: [yocto-patches] [meta-security][scarthgap][PATCH 04/32] scap-security-guide: fix fetch

Quoted 22 lines

From: Marta Rybczynska <[email protected]>
@
The project does not keep releases in branches, instead they tag them. The stable branch does not contain releases, so we use the revision only.
@
See upstream issue [1] for details.
@
[1] https://github.com/ComplianceAsCode/content/issues/13543
@

---

 .../scap-security-guide/scap-security-guide_0.1.71.bb           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

@

recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb +0 -0
index 5e45332..e277ccf 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820"
 LICENSE = "BSD-3-Clause"

@@
SRCREV = "459f0abf2ac08d36e5fc4a2619bc75cff7000da9"

recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820" · line 13

Quoted 5 lines
recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb +1 -1
-SRC_URI = "git://github.com/ComplianceAsCode/content.git;branch=stable;protocol=https \
+SRC_URI = "git://github.com/ComplianceAsCode/content.git;nobranch=1;protocol=https \
            file://run_eval.sh \
            file://run-ptest \
            "   

Hi, Scott

I would suggest instead updating the SRCREV to
879672a39577a8b8c9413641c9e6b8a0bd4f12bc.

See https://lists.yoctoproject.org/g/yocto-patches/topic/116289037

--
Clayton Casciato

#6 lore raw

Re: [yocto-patches] [meta-security][scarthgap][PATCH 04/32] scap-security-guide: fix fetch

Quoted 29 lines · Clayton Casciato
Quoted 22 lines

From: Marta Rybczynska <[email protected]>
@
The project does not keep releases in branches, instead they tag them. The stable branch does not contain releases, so we use the revision only.
@
See upstream issue [1] for details.
@
[1] https://github.com/ComplianceAsCode/content/issues/13543
@

---
 .../scap-security-guide/scap-security-guide_0.1.71.bb           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

@

recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb +0 -0
index 5e45332..e277ccf 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820"
 LICENSE = "BSD-3-Clause"

@@
SRCREV = "459f0abf2ac08d36e5fc4a2619bc75cff7000da9"

recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820" · line 13

Quoted 5 lines
recipes-compliance/scap-security-guide/scap-security-guide_0.1.71.bb +1 -1
-SRC_URI = "git://github.com/ComplianceAsCode/content.git;branch=stable;protocol=https \
+SRC_URI = "git://github.com/ComplianceAsCode/content.git;nobranch=1;protocol=https \
            file://run_eval.sh \
            file://run-ptest \
            "

Hi, Scott

Quoted 4 lines

I would suggest instead updating the SRCREV to
879672a39577a8b8c9413641c9e6b8a0bd4f12bc.

See https://lists.yoctoproject.org/g/yocto-patches/topic/116289037

459f0abf2ac08d36e5fc4a2619bc75cff7000da9 is the commit that the v0.1.71 tag points at, so it is what should be used in order to avoid confusion. Now it is indeed the case that since this change was made upstream have reworked their stable branch by merging all the dangling release branches into it, so we can potentially drop this for scarthgap, I'll try a sanity test build. The upgrade to v0.1.78 is queued on master-next, my plan is to take it as is, then we can drop a one-liner on to change the branch, then backport to scarthgap in the next pass.

Thanks,

Scott

#7 lore raw

PATCH 5/32 lynis: update 3.1.1 -> 3.1.4

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

Changelog at [1].

[1] https://cisofy.com/changelog/lynis/#314

---
 recipes-compliance/lynis/{lynis_3.1.1.bb => lynis_3.1.4.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename recipes-compliance/lynis/{lynis_3.1.1.bb => lynis_3.1.4.bb} (93%)
recipes-compliance/lynis/lynis_3.1.4.bb renamed from recipes-compliance/lynis/lynis_3.1.1.bb +1 -1
similarity index 93%
rename from recipes-compliance/lynis/lynis_3.1.1.bb
rename to recipes-compliance/lynis/lynis_3.1.4.bb
index b69f4df..9cce848 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3edd6782854304fd11da4975ab9799c1"
 
 SRC_URI = "https://downloads.cisofy.com/lynis/${BPN}-${PV}.tar.gz"
 
-SRC_URI[sha256sum] = "d72f4ee7325816bb8dbfcf31eb104207b9fe58a2493c2a875373746a71284cc3"
+SRC_URI[sha256sum] = "c4dbcddd429624d5b2319cd3b19728e18a7885b70b8eb0a9fdd3ca5f0ae28eb6"
 
 #UPSTREAM_CHECK = "https://downloads.cisofy.com/lynis"
 
Signature · 1 line
2.47.3
#8 lore raw

PATCH 6/32 chkrootkit: use debian mirror

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

Use the debian mirror as the ubuntu one is failing frequently.

---
 recipes-scanners/rootkits/chkrootkit_0.57.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-scanners/rootkits/chkrootkit_0.57.bb +1 -1
index d35f5f6..c3d2f9b 100644
@@ -5,7 +5,7 @@ SECTION = "security"
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fdbe53788f7081c63387d8087273f5ff"
 
-SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/universe/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "http://deb.debian.org/debian/pool/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://musl_fix.patch"
 SRC_URI[sha256sum] = "06d1faee151aa3e3c0f91ac807ca92e60b75ed1c18268ccef2c45117156d253c"
 
Signature · 1 line
2.47.3
#9 lore raw

PATCH 7/32 checksecurity: update the debian package

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

The previously used package (nmu1) is not longer available, use the latest current one (nmu3). The changelog between the two:

checksecurity (2.0.16+nmu3) unstable; urgency=medium

* Non-maintainer upload.
* Fix "missing required debian/rules targets build-arch and/or build- indep": Add targets to debian/rules.
(Closes: #999082)
* Fix "Removal of obsolete debhelper compat 5 and 6 in bookworm":
Bump to 7 in debian/{compat,control}.
(Closes: #965448)
* Fix some grave packaging errors:
- move debhelper from Build-Depends-Indep to Build-Depends
- remove temporary files debian/postrm.debhelper and debian/substvars from source package

-- gregor herrmann <[email protected]> Sun, 26 Dec 2021 01:56:10 +0100

checksecurity (2.0.16+nmu2) unstable; urgency=medium

* Non maintainer upload by the Reproducible Builds team.
* No source change upload to rebuild on buildd with .buildinfo files.

-- Holger Levsen <[email protected]> Fri, 01 Jan 2021 19:17:53 +0100

(adapted from 828a78314f51b919baf638d64e8e12c0c0a408ad)

---
 .../recipes-scanners/checksecurity/checksecurity_2.0.16.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
dynamic-layers/meta-perl/recipes-scanners/checksecurity/checksecurity_2.0.16.bb +3 -4
index 8006c9f..6a223f8 100644
@@ -4,14 +4,13 @@ SECTION = "security"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
 
-SRC_URI = "http://ftp.de.debian.org/debian/pool/main/c/checksecurity/checksecurity_${PV}+nmu1.tar.gz \
+SRC_URI = "http://ftp.de.debian.org/debian/pool/main/c/checksecurity/checksecurity_${PV}+nmu3.tar.gz \
            file://check-setuid-use-more-portable-find-args.patch \
           "
 
-SRC_URI[sha256sum] = "9803b3760e9ec48e06ebaf48cec081db48c6fe72254a476224e4c5c55ed97fb0"
-
-S = "${WORKDIR}/checksecurity-${PV}+nmu1"
+SRC_URI[sha256sum] = "12b043dc7b38512cdf0735c7c147a4f9e60d83a397b5b8ec130c65ceddbe1a0c"
 
+S = "${WORKDIR}/checksecurity-${PV}+nmu3"
 
 # allow for anylocal, no need to patch
 LOGDIR="/etc/checksecurity"
Signature · 1 line
2.47.3
#10 lore raw

PATCH 8/32 bastille: prevent host uids on files

In reply to Scott Murray

From: Marta Rybczynska <[email protected]>

We get an intermittent QA error about file permissions, happening roughly on 1 build of 10.

The change adds chown to prevent host ids on files related to the set_required_questions.py script, to avoid long debugging for now.

(cherry picked from commit 7bdd0a8b48442e3a93b98647801c2ff5dee7267b)
---
 .../meta-perl/recipes-security/bastille/bastille_3.2.1.bb       | 2 ++
 1 file changed, 2 insertions(+)
dynamic-layers/meta-perl/recipes-security/bastille/bastille_3.2.1.bb +2 -0
index f2ef335..afd7bfc 100644
@@ -146,6 +146,8 @@ do_install () {
 
 	${THISDIR}/files/set_required_questions.py ${D}${sysconfdir}/Bastille/config ${D}${datadir}/Bastille/Questions
 
+	chown root:root -R ${D}/${datadir}/Bastille
+
 	ln -s RevertBastille ${D}${sbindir}/UndoBastille
 
     # Create /var/log/Bastille in runtime.
Signature · 1 line
2.47.3
#11 lore raw

PATCH 9/32 libgssglue: switch to use git source

In reply to Scott Murray

From: Chen Qi <[email protected]>

The 0.8 orig.tar.gz is not in debian mirror any more. In fact, we really should avoid using orig.tar.gz like this because distros like debian will just delete those that they don't maintain any more.

Switch to use git source.

(cherry picked from commit baaafdf08b7ffb8703618684d571c4766ea3e28e)
---
 recipes-security/libgssglue/libgssglue_0.8.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
recipes-security/libgssglue/libgssglue_0.8.bb +3 -2
index 9d01964..e534615 100644
@@ -21,11 +21,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=56871e72a5c475289c0d5e4ba3f2ee3a \
                     file://src/oid_ops.c;beginline=378;endline=398;md5=72457a5cdc0354cb5c25c8b150326364\
 "
 
-SRC_URI = "${DEBIAN_MIRROR}/main/libg/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "git://gitlab.com/gsasl/libgssglue.git;protocol=https;branch=master \
            file://libgssglue-canon-name.patch  \
 "
+SRCREV = "c8b4b2936b854a7d4f7ef12e30d6f519b30dec87"
 
-SRC_URI[sha256sum] = "a2bb183e946f6e30562a2a856950a2916c9b6d42c34d67a8400e4efc28917746"
+S = "${WORKDIR}/git"
 
 inherit autotools-brokensep
 
Signature · 1 line
2.47.3
#12 lore raw

PATCH 10/32 packagegroup-core-security: add missing packages

In reply to Scott Murray

Changes:
- Add libmhash and libgssglue so they will get tested by CI.
- Switch to MACHINE_ARCH to facilitate the above, but it makes sense anyway due to all the machine overrides used in the packagegroup definition. Since this packagegroup is to facilitate testing and unlikely to be used by downstreams, it is believed this will have minimal impact.

(adapted from 26e745243d6d28768ed4a237d9a48f68210c70a6)

---
 recipes-core/packagegroup/packagegroup-core-security.bb | 4 ++++
 1 file changed, 4 insertions(+)
recipes-core/packagegroup/packagegroup-core-security.bb +4 -0
index 3ef77e5..10063c3 100644
@@ -3,6 +3,8 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 inherit packagegroup
 
 PACKAGES = "\
@@ -36,6 +38,8 @@ RDEPENDS:packagegroup-security-utils = "\
     fscryptctl \
     glome \
     keyutils \
+    libgssglue \
+    libmhash \
     nmap \
     pinentry \
     softhsm \
Signature · 1 line
2.47.3
#13 lore raw

PATCH 11/32 meta-tpm: Small maintainers fix

In reply to Scott Murray

To avoid confusion, remove stray aircrack-ng entry as it is actually in the main layer and not meta-tpm.

(cherry picked from commit 9f1d763bb17bf105cc313a95eb3b07496b34bacc)
---
 meta-tpm/conf/distro/include/maintainers-meta-tpm.inc | 1 -
 1 file changed, 1 deletion(-)
meta-tpm/conf/distro/include/maintainers-meta-tpm.inc +0 -1
index 829f198..0925eef 100644
@@ -19,7 +19,6 @@
 #	RECIPE_MAINTAINER:pn-<recipe name> = "Full Name <address@domain>"
 #
 # Please keep this list in alphabetical order.
-RECIPE_MAINTAINER:pn-aircrack-ng = "Scott Murray <[email protected]>"
 RECIPE_MAINTAINER:pn-pcr-extend = "Scott Murray <[email protected]>"
 RECIPE_MAINTAINER:pn-tpm-quote-tools = "Scott Murray <[email protected]>"
 RECIPE_MAINTAINER:pn-libtpms = "Scott Murray <[email protected]>"
Signature · 1 line
2.47.3
#14 lore raw

PATCH 12/32 ima-evm-utils: remove unnecessary FILESEXTRAPATHS tweak

In reply to Scott Murray

It was pointed out that the recipe was wrongly doing FILESEXTRAPATHS:append, but on inspection the recipe does not need it at all, so just remove.

(cherry picked from commit 5770a76fc0d78a645ab254979986f572fd18b3ec)
---
 .../recipes-security/ima-evm-utils/ima-evm-utils_1.5.bb         | 2 --
 1 file changed, 2 deletions(-)
meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils_1.5.bb +0 -2
index 8ac080c..ac0a383 100644
@@ -6,8 +6,6 @@ DEPENDS += "openssl attr keyutils"
 
 DEPENDS:class-native += "openssl-native keyutils-native"
 
-FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
-
 SRC_URI = " \
     https://github.com/mimizohar/ima-evm-utils/releases/download/v${PV}/${BP}.tar.gz \
     file://0001-Do-not-get-generation-using-ioctl-when-evm_portable-.patch \
Signature · 1 line
2.47.3
#15 lore raw

PATCH 13/32 harden-image-minimal: Fix usermod

In reply to Scott Murray

From: Armin Kuster <[email protected]>

(cherry picked from commit c08a91e5e607806460854936ef622f6f78bb0f03)
---
 meta-hardening/recipes-core/images/harden-image-minimal.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-hardening/recipes-core/images/harden-image-minimal.bb +2 -2
index 38771cd..4366961 100644
@@ -18,9 +18,9 @@ DEFAULT_ADMIN_ACCOUNT ?= "myadmin"
 DEFAULT_ADMIN_GROUP ?= "wheel"
 DEFAULT_ADMIN_ACCOUNT_PASSWORD ?= "1SimplePw!"
 
-EXTRA_USERS_PARAMS = "${@bb.utils.contains('DISABLE_ROOT', 'True', "usermod -L root;", "usermod -P '${ROOT_DEFAULT_PASSWORD}' root;", d)}"
+EXTRA_USERS_PARAMS = "${@bb.utils.contains('DISABLE_ROOT', 'True', "usermod -L root;", "usermod -p '${ROOT_DEFAULT_PASSWORD}' root;", d)}"
 
 EXTRA_USERS_PARAMS:append = " useradd  ${DEFAULT_ADMIN_ACCOUNT};" 
 EXTRA_USERS_PARAMS:append = " groupadd  ${DEFAULT_ADMIN_GROUP};" 
-EXTRA_USERS_PARAMS:append = " usermod -P '${DEFAULT_ADMIN_ACCOUNT_PASSWORD}' ${DEFAULT_ADMIN_ACCOUNT};" 
+EXTRA_USERS_PARAMS:append = " usermod -p '${DEFAULT_ADMIN_ACCOUNT_PASSWORD}' ${DEFAULT_ADMIN_ACCOUNT};" 
 EXTRA_USERS_PARAMS:append = " usermod -aG ${DEFAULT_ADMIN_GROUP}  ${DEFAULT_ADMIN_ACCOUNT};" 
Signature · 1 line
2.47.3
#16 lore raw

PATCH 14/32 suricata: fix CVE-2024-45795 & CVE-2024-45796

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

* CVE-2024-45795 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/72456d359bf3064306b62024c809bb30b162f18c && https://github.com/OISF/suricata/commit/96d5c81aed01f2bc0cd3e2e60057d0deb38caa99
* CVE-2024-45796 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/9203656496c4081260817cce018a0d8fd57869b5

---
 .../suricata/files/CVE-2024-45795.patch       | 123 ++++++++++++++++++
 .../suricata/files/CVE-2024-45796.patch       |  33 +++++
 recipes-ids/suricata/suricata_7.0.0.bb        |   2 +
 3 files changed, 158 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2024-45795.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-45796.patch
recipes-ids/suricata/files/CVE-2024-45795.patch new file +123 -0
new file mode 100644
index 0000000..10363c5
@@ -0,0 +1,123 @@
+From 72456d359bf3064306b62024c809bb30b162f18c Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Mon, 12 Aug 2024 09:54:43 +0200
+Subject: [PATCH] detect/datasets: implement unset command
+
+Ticket: 7195
+
+Otherwise, Suricata aborted on such a rule
+
+(cherry picked from commit e47598110a557bb9f87ea498d85ba91a45bb0cb6)
+
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/72456d359bf3064306b62024c809bb30b162f18c && https://github.com/OISF/suricata/commit/96d5c81aed01f2bc0cd3e2e60057d0deb38caa99]
+CVE: CVE-2024-45795
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ doc/userguide/rules/datasets.rst |  2 +-
+ src/datasets.c                   | 20 ++++++++++++++++++++
+ src/datasets.h                   |  1 +
+ src/detect-dataset.c             | 11 +++++++++++
+ src/detect-dataset.h             |  5 -----
+ 5 files changed, 33 insertions(+), 6 deletions(-)
+
+diff --git a/doc/userguide/rules/datasets.rst b/doc/userguide/rules/datasets.rst
+index 647b12e..dd9ecd2 100644
+--- a/doc/userguide/rules/datasets.rst
++++ b/doc/userguide/rules/datasets.rst
+@@ -78,7 +78,7 @@ Syntax::
+ 
+     dataset:<cmd>,<name>,<options>;
+ 
+-    dataset:<set|isset|isnotset>,<name> \
++    dataset:<set|unset|isset|isnotset>,<name> \
+         [, type <string|md5|sha256|ipv4|ip>, save <file name>, load <file name>, state <file name>, memcap <size>, hashsize <size>];
+ 
+ type <type>
+diff --git a/src/datasets.c b/src/datasets.c
+index d89ed8d..32bcf6e 100644
+--- a/src/datasets.c
++++ b/src/datasets.c
+@@ -1741,3 +1741,23 @@ int DatasetRemoveSerialized(Dataset *set, const char *string)
+     return DatasetOpSerialized(set, string, DatasetRemoveString, DatasetRemoveMd5,
+             DatasetRemoveSha256, DatasetRemoveIPv4, DatasetRemoveIPv6);
+ }
++
++int DatasetRemove(Dataset *set, const uint8_t *data, const uint32_t data_len)
++{
++    if (set == NULL)
++        return -1;
++
++    switch (set->type) {
++        case DATASET_TYPE_STRING:
++            return DatasetRemoveString(set, data, data_len);
++        case DATASET_TYPE_MD5:
++            return DatasetRemoveMd5(set, data, data_len);
++        case DATASET_TYPE_SHA256:
++            return DatasetRemoveSha256(set, data, data_len);
++        case DATASET_TYPE_IPV4:
++            return DatasetRemoveIPv4(set, data, data_len);
++        case DATASET_TYPE_IPV6:
++            return DatasetRemoveIPv6(set, data, data_len);
++    }
++    return -1;
++}
+diff --git a/src/datasets.h b/src/datasets.h
+index af4fc17..0f28a9f 100644
+--- a/src/datasets.h
++++ b/src/datasets.h
+@@ -56,6 +56,7 @@ Dataset *DatasetFind(const char *name, enum DatasetTypes type);
+ Dataset *DatasetGet(const char *name, enum DatasetTypes type, const char *save, const char *load,
+         uint64_t memcap, uint32_t hashsize);
+ int DatasetAdd(Dataset *set, const uint8_t *data, const uint32_t data_len);
++int DatasetRemove(Dataset *set, const uint8_t *data, const uint32_t data_len);
+ int DatasetLookup(Dataset *set, const uint8_t *data, const uint32_t data_len);
+ DataRepResultType DatasetLookupwRep(Dataset *set, const uint8_t *data, const uint32_t data_len,
+         const DataRepType *rep);
+diff --git a/src/detect-dataset.c b/src/detect-dataset.c
+index 3d29646..aad5cf0 100644
+--- a/src/detect-dataset.c
++++ b/src/detect-dataset.c
+@@ -41,6 +41,11 @@
+ #include "util-path.h"
+ #include "util-conf.h"
+ 
++#define DETECT_DATASET_CMD_SET      0
++#define DETECT_DATASET_CMD_UNSET    1
++#define DETECT_DATASET_CMD_ISNOTSET 2
++#define DETECT_DATASET_CMD_ISSET    3
++
+ int DetectDatasetMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+         const Signature *, const SigMatchCtx *);
+ static int DetectDatasetSetup (DetectEngineCtx *, Signature *, const char *);
+@@ -91,6 +96,12 @@ int DetectDatasetBufferMatch(DetectEngineThreadCtx *det_ctx,
+                 return 1;
+             break;
+         }
++        case DETECT_DATASET_CMD_UNSET: {
++            int r = DatasetRemove(sd->set, data, data_len);
++            if (r == 1)
++                return 1;
++            break;
++        }
+         default:
+             abort();
+     }
+diff --git a/src/detect-dataset.h b/src/detect-dataset.h
+index ca83267..d243552 100644
+--- a/src/detect-dataset.h
++++ b/src/detect-dataset.h
+@@ -26,11 +26,6 @@
+ 
+ #include "datasets.h"
+ 
+-#define DETECT_DATASET_CMD_SET      0
+-#define DETECT_DATASET_CMD_UNSET    1
+-#define DETECT_DATASET_CMD_ISNOTSET 2
+-#define DETECT_DATASET_CMD_ISSET    3
+-
+ typedef struct DetectDatasetData_ {
+     Dataset *set;
+     uint8_t cmd;
+-- 
+2.25.1
+
recipes-ids/suricata/files/CVE-2024-45796.patch new file +33 -0
new file mode 100644
index 0000000..ae00a5f
@@ -0,0 +1,33 @@
+From 9203656496c4081260817cce018a0d8fd57869b5 Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Mon, 15 Jul 2024 09:52:00 +0200
+Subject: [PATCH] defrag: fix off by one
+
+Ticket: 7067
+
+This off by one could lead to an empty fragment being inserted
+in the rb tree, which led to integer underflow.
+
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/9203656496c4081260817cce018a0d8fd57869b5]
+CVE: CVE-2024-45796
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ src/defrag.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/defrag.c b/src/defrag.c
+index 71cf420..38704c9 100644
+--- a/src/defrag.c
++++ b/src/defrag.c
+@@ -808,7 +808,7 @@ DefragInsertFrag(ThreadVars *tv, DecodeThreadVars *dtv, DefragTracker *tracker,
+         }
+     }
+ 
+-    if (ltrim > data_len) {
++    if (ltrim >= data_len) {
+         /* Full packet has been trimmed due to the overlap policy. Overlap
+          * already set. */
+         goto done;
+-- 
+2.25.1
+
recipes-ids/suricata/suricata_7.0.0.bb +2 -0
index a01b3d9..e5d6ed1 100644
@@ -16,6 +16,8 @@ SRC_URI += " \
     file://suricata.service \
     file://run-ptest \
     file://fixup.patch \
+    file://CVE-2024-45795.patch \
+    file://CVE-2024-45796.patch \
     "
 
 inherit autotools pkgconfig python3native systemd ptest cargo cargo-update-recipe-crates
Signature · 1 line
2.47.3
#17 lore raw

PATCH 15/32 meta-security: Remove True option to getVar calls

In reply to Scott Murray

From: akash hadke <[email protected]>

getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace.

---
 meta-integrity/classes/ima-evm-rootfs.bbclass                 | 2 +-
 .../recipes-parsec/parsec-service/parsec-service_1.3.0.bb     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
meta-integrity/classes/ima-evm-rootfs.bbclass +1 -1
index 7b73373..8b2e767 100644
@@ -59,7 +59,7 @@ ima_evm_sign_rootfs () {
     #
     # Deduplicates iversion in case that this gets called more than once.
     if [ -f etc/fstab ]; then
-       perl -pi -e 's;(\S+)(\s+)(${@"|".join((d.getVar("IMA_EVM_ROOTFS_IVERSION", True) or "no-such-mount-point").split())})(\s+)(\S+)(\s+)(\S+);\1\2\3\4\5\6\7,iversion;; s/(,iversion)+/,iversion/;' etc/fstab
+       perl -pi -e 's;(\S+)(\s+)(${@"|".join((d.getVar("IMA_EVM_ROOTFS_IVERSION") or "no-such-mount-point").split())})(\s+)(\S+)(\s+)(\S+);\1\2\3\4\5\6\7,iversion;; s/(,iversion)+/,iversion/;' etc/fstab
     fi
 
     # Detect 32bit target to pass --m32 to evmctl by looking at libc
meta-parsec/recipes-parsec/parsec-service/parsec-service_1.3.0.bb +2 -2
index 477988e..6887b9f 100644
@@ -27,11 +27,11 @@ PACKAGECONFIG[MBED-CRYPTO] = "mbed-crypto-provider,"
 PACKAGECONFIG[CRYPTOAUTHLIB] = "cryptoauthlib-provider,"
 PACKAGECONFIG[TS] = "trusted-service-provider,,libts,libts"
 
-PARSEC_FEATURES = "${@d.getVar('PACKAGECONFIG_CONFARGS',True).strip().replace(' ', ',')}"
+PARSEC_FEATURES = "${@d.getVar('PACKAGECONFIG_CONFARGS').strip().replace(' ', ',')}"
 CARGO_BUILD_FLAGS += " --features ${PARSEC_FEATURES}"
 
 export BINDGEN_EXTRA_CLANG_ARGS
-target = "${@d.getVar('TARGET_SYS',True).replace('-', ' ')}"
+target = "${@d.getVar('TARGET_SYS').replace('-', ' ')}"
 BINDGEN_EXTRA_CLANG_ARGS = "${@bb.utils.contains('target', 'arm', \
                               '--sysroot=${WORKDIR}/recipe-sysroot -I${WORKDIR}/recipe-sysroot/usr/include -mfloat-abi=hard', \
                               '--sysroot=${WORKDIR}/recipe-sysroot -I${WORKDIR}/recipe-sysroot/usr/include', \
Signature · 1 line
2.47.3
#18 lore raw

PATCH 16/32 suricata: Fix CVE-2024-55605

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Upstream-Status: Backport from https://github.com/OISF/suricata/commit/f80ebd5a30b02db5915f749f0c067c7adefbbe76 && https://github.com/OISF/suricata/commit/c3a6abf60134c2993ee3802ee52206e9fdbf55ba

---
 .../suricata/files/CVE-2024-55605.patch       | 205 ++++++++++++++++++
 recipes-ids/suricata/suricata_7.0.0.bb        |   1 +
 2 files changed, 206 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55605.patch
recipes-ids/suricata/files/CVE-2024-55605.patch new file +205 -0
new file mode 100644
index 0000000..c8bfead
@@ -0,0 +1,205 @@
+From f80ebd5a30b02db5915f749f0c067c7adefbbe76 Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Thu, 7 Nov 2024 17:49:45 +0100
+Subject: [PATCH] detect/transforms: write directly in inspect buffer
+
+instead of writing to a temporary buffer and then copying,
+to save the cost of copying.
+
+Ticket: 7229
+
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/f80ebd5a30b02db5915f749f0c067c7adefbbe76 && https://github.com/OISF/suricata/commit/c3a6abf60134c2993ee3802ee52206e9fdbf55ba]
+CVE: CVE-2024-55605
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ src/detect-engine.c                        | 23 ++++++++++++++++++++--
+ src/detect-engine.h                        |  3 ++-
+ src/detect-transform-compress-whitespace.c |  8 ++++++--
+ src/detect-transform-dotprefix.c           | 10 +++++++---
+ src/detect-transform-strip-whitespace.c    |  8 ++++++--
+ src/detect-transform-urldecode.c           |  8 ++++++--
+ src/detect-transform-xor.c                 |  7 +++++--
+ 7 files changed, 53 insertions(+), 14 deletions(-)
+
+diff --git a/src/detect-engine.c b/src/detect-engine.c
+index 141b48a..cdb24d8 100644
+--- a/src/detect-engine.c
++++ b/src/detect-engine.c
+@@ -1647,11 +1647,13 @@ void InspectionBufferFree(InspectionBuffer *buffer)
+ /**
+  * \brief make sure that the buffer has at least 'min_size' bytes
+  * Expand the buffer if necessary
++ *
++ * \retval pointer to inner buffer to use, or NULL if realloc failed
+  */
+-void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size)
++uint8_t *InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size)
+ {
+     if (likely(buffer->size >= min_size))
+-        return;
++        return buffer->buf;
+ 
+     uint32_t new_size = (buffer->size == 0) ? 4096 : buffer->size;
+     while (new_size < min_size) {
+@@ -1662,7 +1664,24 @@ void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size)
+     if (ptr != NULL) {
+         buffer->buf = ptr;
+         buffer->size = new_size;
++    } else {
++        return NULL;
+     }
++    return buffer->buf;
++}
++
++/**
++ * \brief set inspect length of inspect buffer
++ * The inspect buffer may have been overallocated (by strip_whitespace for example)
++ * so, this sets the final length
++ */
++void InspectionBufferTruncate(InspectionBuffer *buffer, uint32_t buf_len)
++{
++    DEBUG_VALIDATE_BUG_ON(buffer->buf == NULL);
++    DEBUG_VALIDATE_BUG_ON(buf_len > buffer->size);
++    buffer->inspect = buffer->buf;
++    buffer->inspect_len = buf_len;
++    buffer->initialized = true;
+ }
+ 
+ void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len)
+diff --git a/src/detect-engine.h b/src/detect-engine.h
+index 7617e66..04713a7 100644
+--- a/src/detect-engine.h
++++ b/src/detect-engine.h
+@@ -31,7 +31,8 @@ void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size);
+ void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
+         InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
+ void InspectionBufferFree(InspectionBuffer *buffer);
+-void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
++uint8_t *InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
++void InspectionBufferTruncate(InspectionBuffer *buffer, uint32_t buf_len);
+ void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len);
+ void InspectionBufferApplyTransforms(InspectionBuffer *buffer,
+         const DetectEngineTransforms *transforms);
+diff --git a/src/detect-transform-compress-whitespace.c b/src/detect-transform-compress-whitespace.c
+index 5cbf0fd..cc78c7e 100644
+--- a/src/detect-transform-compress-whitespace.c
++++ b/src/detect-transform-compress-whitespace.c
+@@ -111,7 +111,11 @@ static void TransformCompressWhitespace(InspectionBuffer *buffer, void *options)
+         return;
+     }
+ 
+-    uint8_t output[input_len]; // we can only shrink
++    // we can only shrink
++    uint8_t *output = InspectionBufferCheckAndExpand(buffer, input_len);
++    if (output == NULL) {
++        return;
++    }
+     uint8_t *oi = output, *os = output;
+ 
+     //PrintRawDataFp(stdout, input, input_len);
+@@ -132,7 +136,7 @@ static void TransformCompressWhitespace(InspectionBuffer *buffer, void *options)
+     uint32_t output_size = oi - os;
+     //PrintRawDataFp(stdout, output, output_size);
+ 
+-    InspectionBufferCopy(buffer, os, output_size);
++    InspectionBufferTruncate(buffer, output_size);
+ }
+ 
+ #ifdef UNITTESTS
+diff --git a/src/detect-transform-dotprefix.c b/src/detect-transform-dotprefix.c
+index 52a2633..d58e1d4 100644
+--- a/src/detect-transform-dotprefix.c
++++ b/src/detect-transform-dotprefix.c
+@@ -110,11 +110,15 @@ static void TransformDotPrefix(InspectionBuffer *buffer, void *options)
+     const size_t input_len = buffer->inspect_len;
+ 
+     if (input_len) {
+-        uint8_t output[input_len + 1]; // For the leading '.'
++        // For the leading '.'
++        uint8_t *output = InspectionBufferCheckAndExpand(buffer, input_len + 1);
++        if (output == NULL) {
++            return;
++        }
+ 
++        memmove(&output[1], buffer->inspect, input_len);
+         output[0] = '.';
+-        memcpy(&output[1], buffer->inspect, input_len);
+-        InspectionBufferCopy(buffer, output, input_len + 1);
++        InspectionBufferTruncate(buffer, input_len + 1);
+     }
+ }
+ 
+diff --git a/src/detect-transform-strip-whitespace.c b/src/detect-transform-strip-whitespace.c
+index 32fb96f..6040592 100644
+--- a/src/detect-transform-strip-whitespace.c
++++ b/src/detect-transform-strip-whitespace.c
+@@ -106,7 +106,11 @@ static void TransformStripWhitespace(InspectionBuffer *buffer, void *options)
+     if (input_len == 0) {
+         return;
+     }
+-    uint8_t output[input_len]; // we can only shrink
++    // we can only shrink
++    uint8_t *output = InspectionBufferCheckAndExpand(buffer, input_len);
++    if (output == NULL) {
++        return;
++    }
+     uint8_t *oi = output, *os = output;
+ 
+     //PrintRawDataFp(stdout, input, input_len);
+@@ -119,7 +123,7 @@ static void TransformStripWhitespace(InspectionBuffer *buffer, void *options)
+     uint32_t output_size = oi - os;
+     //PrintRawDataFp(stdout, output, output_size);
+ 
+-    InspectionBufferCopy(buffer, os, output_size);
++    InspectionBufferTruncate(buffer, output_size);
+ }
+ 
+ #ifdef UNITTESTS
+diff --git a/src/detect-transform-urldecode.c b/src/detect-transform-urldecode.c
+index 13ef033..a4e9655 100644
+--- a/src/detect-transform-urldecode.c
++++ b/src/detect-transform-urldecode.c
+@@ -125,12 +125,16 @@ static void TransformUrlDecode(InspectionBuffer *buffer, void *options)
+     if (input_len == 0) {
+         return;
+     }
+-    uint8_t output[input_len]; // we can only shrink
++    // we can only shrink
++    uint8_t *output = InspectionBufferCheckAndExpand(buffer, input_len);
++    if (output == NULL) {
++        return;
++    }
+ 
+     changed = BufferUrlDecode(input, input_len, output, &output_size);
+ 
+     if (changed) {
+-        InspectionBufferCopy(buffer, output, output_size);
++        InspectionBufferTruncate(buffer, output_size);
+     }
+ }
+ 
+diff --git a/src/detect-transform-xor.c b/src/detect-transform-xor.c
+index e42700f..18f96df 100644
+--- a/src/detect-transform-xor.c
++++ b/src/detect-transform-xor.c
+@@ -133,12 +133,15 @@ static void DetectTransformXor(InspectionBuffer *buffer, void *options)
+     if (input_len == 0) {
+         return;
+     }
+-    uint8_t output[input_len];
++    uint8_t *output = InspectionBufferCheckAndExpand(buffer, input_len);
++    if (output == NULL) {
++        return;
++    }
+ 
+     for (uint32_t i = 0; i < input_len; i++) {
+         output[i] = input[i] ^ pxd->key[i % pxd->length];
+     }
+-    InspectionBufferCopy(buffer, output, input_len);
++    InspectionBufferTruncate(buffer, input_len);
+ }
+ 
+ #ifdef UNITTESTS
+-- 
+2.25.1
+
recipes-ids/suricata/suricata_7.0.0.bb +1 -0
index e5d6ed1..1cb02f4 100644
@@ -18,6 +18,7 @@ SRC_URI += " \
     file://fixup.patch \
     file://CVE-2024-45795.patch \
     file://CVE-2024-45796.patch \
+    file://CVE-2024-55605.patch \
     "
 
 inherit autotools pkgconfig python3native systemd ptest cargo cargo-update-recipe-crates
Signature · 1 line
2.47.3
#19 lore raw

PATCH 17/32 clamav: fix CVE-2025-20260

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Upstream-Status: Backport https://github.com/Cisco-Talos/clamav/commit/7fe290b573db66ffcf590902977b2b6043b30834

---
 recipes-scanners/clamav/clamav_0.104.4.bb     |   1 +
 .../clamav/files/CVE-2025-20260.patch         | 366 ++++++++++++++++++
 2 files changed, 367 insertions(+)
 create mode 100644 recipes-scanners/clamav/files/CVE-2025-20260.patch
recipes-scanners/clamav/clamav_0.104.4.bb +1 -0
index d7beade..0bd776c 100644
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/Cisco-Talos/clamav;branch=rel/0.104;protocol=https \
     file://oe_cmake_fixup.patch \
     file://CVE-2024-20505.patch \
     file://CVE-2024-20506.patch \
+    file://CVE-2025-20260.patch \
 "
 S = "${WORKDIR}/git"
 
recipes-scanners/clamav/files/CVE-2025-20260.patch new file +366 -0

366 lines not on this page · raw message

Signature · 1 line
2.47.3
#20 lore raw

PATCH 18/32 suricata: fix multiple CVEs

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Backport fixes for:

* CVE-2025-29916 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/2f432c99a9734ea3a75c9218f35060e11a7a39ad && https://github.com/OISF/suricata/commit/e28c8c655a324a18932655a2c2b8f0d5aa1c55d7 && https://github.com/OISF/suricata/commit/d86c5f9f0c75736d4fce93e27c0773fcb27e1047
* CVE-2025-29917 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/bab716776ba3561cfbfd1a57fc18ff1f6859f019
* CVE-2025-29918 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/f6c9490e1f7b0b375c286d5313ebf3bc81a95eb6

---
 .../suricata/files/CVE-2025-29916-01.patch    | 124 +++++++++++
 .../suricata/files/CVE-2025-29916-02.patch    | 197 ++++++++++++++++++
 .../suricata/files/CVE-2025-29916-03.patch    |  55 +++++
 .../suricata/files/CVE-2025-29917.patch       | 115 ++++++++++
 .../suricata/files/CVE-2025-29918.patch       |  49 +++++
 recipes-ids/suricata/suricata_7.0.0.bb        |   5 +
 6 files changed, 545 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2025-29916-01.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2025-29916-02.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2025-29916-03.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2025-29917.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2025-29918.patch
recipes-ids/suricata/files/CVE-2025-29916-01.patch new file +124 -0
new file mode 100644
index 0000000..ae020e2
@@ -0,0 +1,124 @@
+From 2f432c99a9734ea3a75c9218f35060e11a7a39ad Mon Sep 17 00:00:00 2001
+From: Victor Julien <[email protected]>
+Date: Tue, 18 Mar 2025 10:55:39 +0100
+Subject: [PATCH] datasets: improve default hashsize handling
+
+Make hashsize default local to dataset code, instead of relying on the
+thash code.
+
+Use the same default value as before.
+
+(cherry picked from commit d32a39ca4b53d7f659f4f0a2a5c162ef97dc4797)
+
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/2f432c99a9734ea3a75c9218f35060e11a7a39ad]
+CVE: CVE-2025-29916
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ src/datasets.c | 37 +++++++++++++++++++++++--------------
+ 1 file changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/src/datasets.c b/src/datasets.c
+index 32bcf6e..89e7899 100644
+--- a/src/datasets.c
++++ b/src/datasets.c
+@@ -677,6 +677,11 @@ Dataset *DatasetGet(const char *name, enum DatasetTypes type, const char *save,
+         }
+     }
+ 
++    GetDefaultMemcap(&default_memcap, &default_hashsize);
++    if (hashsize == 0) {
++        hashsize = default_hashsize;
++    }
++
+     set = DatasetAlloc(name);
+     if (set == NULL) {
+         goto out_err;
+@@ -696,12 +701,11 @@ Dataset *DatasetGet(const char *name, enum DatasetTypes type, const char *save,
+     char cnf_name[128];
+     snprintf(cnf_name, sizeof(cnf_name), "datasets.%s.hash", name);
+ 
+-    GetDefaultMemcap(&default_memcap, &default_hashsize);
+     switch (type) {
+         case DATASET_TYPE_MD5:
+             set->hash = THashInit(cnf_name, sizeof(Md5Type), Md5StrSet, Md5StrFree, Md5StrHash,
+                     Md5StrCompare, load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap,
+-                    hashsize > 0 ? hashsize : default_hashsize);
++                    hashsize);
+             if (set->hash == NULL)
+                 goto out_err;
+             if (DatasetLoadMd5(set) < 0)
+@@ -710,7 +714,7 @@ Dataset *DatasetGet(const char *name, enum DatasetTypes type, const char *save,
+         case DATASET_TYPE_STRING:
+             set->hash = THashInit(cnf_name, sizeof(StringType), StringSet, StringFree, StringHash,
+                     StringCompare, load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap,
+-                    hashsize > 0 ? hashsize : default_hashsize);
++                    hashsize);
+             if (set->hash == NULL)
+                 goto out_err;
+             if (DatasetLoadString(set) < 0)
+@@ -719,26 +723,25 @@ Dataset *DatasetGet(const char *name, enum DatasetTypes type, const char *save,
+         case DATASET_TYPE_SHA256:
+             set->hash = THashInit(cnf_name, sizeof(Sha256Type), Sha256StrSet, Sha256StrFree,
+                     Sha256StrHash, Sha256StrCompare, load != NULL ? 1 : 0,
+-                    memcap > 0 ? memcap : default_memcap,
+-                    hashsize > 0 ? hashsize : default_hashsize);
++                    memcap > 0 ? memcap : default_memcap, hashsize);
+             if (set->hash == NULL)
+                 goto out_err;
+             if (DatasetLoadSha256(set) < 0)
+                 goto out_err;
+             break;
+         case DATASET_TYPE_IPV4:
+-            set->hash = THashInit(cnf_name, sizeof(IPv4Type), IPv4Set, IPv4Free, IPv4Hash,
+-                    IPv4Compare, load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap,
+-                    hashsize > 0 ? hashsize : default_hashsize);
++            set->hash =
++                    THashInit(cnf_name, sizeof(IPv4Type), IPv4Set, IPv4Free, IPv4Hash, IPv4Compare,
++                            load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap, hashsize);
+             if (set->hash == NULL)
+                 goto out_err;
+             if (DatasetLoadIPv4(set) < 0)
+                 goto out_err;
+             break;
+         case DATASET_TYPE_IPV6:
+-            set->hash = THashInit(cnf_name, sizeof(IPv6Type), IPv6Set, IPv6Free, IPv6Hash,
+-                    IPv6Compare, load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap,
+-                    hashsize > 0 ? hashsize : default_hashsize);
++            set->hash =
++                    THashInit(cnf_name, sizeof(IPv6Type), IPv6Set, IPv6Free, IPv6Hash, IPv6Compare,
++                            load != NULL ? 1 : 0, memcap > 0 ? memcap : default_memcap, hashsize);
+             if (set->hash == NULL)
+                 goto out_err;
+             if (DatasetLoadIPv6(set) < 0)
+@@ -825,6 +828,10 @@ void DatasetPostReloadCleanup(void)
+     SCMutexUnlock(&sets_lock);
+ }
+ 
++/* Value reflects THASH_DEFAULT_HASHSIZE which is what the default was earlier,
++ * despite 2048 commented out in the default yaml. */
++#define DATASETS_HASHSIZE_DEFAULT 4096
++
+ static void GetDefaultMemcap(uint64_t *memcap, uint32_t *hashsize)
+ {
+     const char *str = NULL;
+@@ -836,12 +843,14 @@ static void GetDefaultMemcap(uint64_t *memcap, uint32_t *hashsize)
+             *memcap = 0;
+         }
+     }
++
++    *hashsize = (uint32_t)DATASETS_HASHSIZE_DEFAULT;
+     if (ConfGet("datasets.defaults.hashsize", &str) == 1) {
+         if (ParseSizeStringU32(str, hashsize) < 0) {
++            *hashsize = (uint32_t)DATASETS_HASHSIZE_DEFAULT;
+             SCLogWarning("hashsize value cannot be deduced: %s,"
+-                         " resetting to default",
+-                    str);
+-            *hashsize = 0;
++                         " resetting to default: %u",
++                    str, *hashsize);
+         }
+     }
+ }
+-- 
+2.49.0
+
recipes-ids/suricata/files/CVE-2025-29916-02.patch new file +197 -0

197 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29916-03.patch new file +55 -0

55 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29917.patch new file +115 -0

115 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29918.patch new file +49 -0

49 lines not on this page · raw message

recipes-ids/suricata/suricata_7.0.0.bb +5 -0
index 1cb02f4..9618c45 100644
@@ -19,6 +19,11 @@ SRC_URI += " \
     file://CVE-2024-45795.patch \
     file://CVE-2024-45796.patch \
     file://CVE-2024-55605.patch \
+    file://CVE-2025-29916-01.patch \
+    file://CVE-2025-29916-02.patch \
+    file://CVE-2025-29916-03.patch \
+    file://CVE-2025-29917.patch \
+    file://CVE-2025-29918.patch \
     "
 
 inherit autotools pkgconfig python3native systemd ptest cargo cargo-update-recipe-crates
Signature · 1 line
2.47.3
#21 lore raw

PATCH 19/32 smack: Switch to CVE_STATUS

In reply to Scott Murray

From: Aidan Stewart <[email protected]>

CVE_CHECK_IGNORE has been deprecated starting with the Nanbield release.

---
 recipes-mac/smack/smack_1.3.1.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
recipes-mac/smack/smack_1.3.1.bb +3 -4
index 6c52392..04e7a6e 100644
@@ -13,10 +13,9 @@ SRC_URI = " \
 
 PV = "1.3.1"
 
-# CVE-2014-0363, CVE-2014-0364, CVE-2016-10027 is valnerble for other product.
-CVE_CHECK_IGNORE += "CVE-2014-0363"
-CVE_CHECK_IGNORE += "CVE-2014-0364"
-CVE_CHECK_IGNORE += "CVE-2016-10027"
+CVE_STATUS[CVE-2014-0363] = "cpe-incorrect: Affects Ignite Realtime Smack XMPP API"
+CVE_STATUS[CVE-2014-0364] = "cpe-incorrect: Affects Ignite Realtime Smack XMPP API"
+CVE_STATUS[CVE-2016-10027] = "cpe-incorrect: Affects Ignite Realtime Smack XMPP API"
 
 inherit autotools update-rc.d pkgconfig ptest
 inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
Signature · 1 line
2.47.3
#22 lore raw

PATCH 20/32 libhtp: fix CVE-2025-53537

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Upstream-Status: Backport from
https://github.com/OISF/libhtp/commit/226580d502ae98c148aaecc4846f78694b5e253c && https://github.com/OISF/libhtp/commit/9037ea35110a0d97be5cedf8d31fb4cd9a38c7a7

---
 .../suricata/files/CVE-2025-53537-001.patch   | 79 +++++++++++++++++++
 .../suricata/files/CVE-2025-53537-002.patch   | 31 ++++++++
 recipes-ids/suricata/libhtp_0.5.45.bb         |  2 +
 3 files changed, 112 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2025-53537-001.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2025-53537-002.patch
recipes-ids/suricata/files/CVE-2025-53537-001.patch new file +79 -0
new file mode 100644
index 0000000..e16a59a
@@ -0,0 +1,79 @@
+From 226580d502ae98c148aaecc4846f78694b5e253c Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Tue, 11 Mar 2025 16:45:35 +0100
+Subject: [PATCH] decompressors: do not take data after end
+
+
+CVE: CVE-2025-53537
+Upstream-Status: Backport [https://github.com/OISF/libhtp/commit/226580d502ae98c148aaecc4846f78694b5e253c]
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ htp/htp_core.h          |  5 ++++-
+ htp/htp_decompressors.c | 21 ++++++++++++---------
+ 2 files changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/htp/htp_core.h b/htp/htp_core.h
+index 7c23212..fb142c9 100644
+--- a/htp/htp_core.h
++++ b/htp/htp_core.h
+@@ -161,7 +161,10 @@ enum htp_content_encoding_t {
+     HTP_COMPRESSION_DEFLATE = 3,
+ 
+     /** LZMA compression. */
+-    HTP_COMPRESSION_LZMA = 4
++    HTP_COMPRESSION_LZMA = 4,
++
++    /** No more data. */
++    HTP_COMPRESSION_OVER = 5
+ };
+ 
+ /**
+diff --git a/htp/htp_decompressors.c b/htp/htp_decompressors.c
+index 19950df..0d94c30 100644
+--- a/htp/htp_decompressors.c
++++ b/htp/htp_decompressors.c
+@@ -203,6 +203,8 @@ htp_status_t htp_gzip_decompressor_decompress(htp_decompressor_t *drec1, htp_tx_
+         }
+ 
+         return HTP_OK;
++    } else if (drec->zlib_initialized == HTP_COMPRESSION_OVER) {
++        return HTP_ERROR;
+     }
+ 
+     if (d->data == NULL) {
+@@ -316,15 +318,9 @@ restart:
+             // no initialization means previous error on stream
+             return HTP_ERROR;
+         }
+-        if (GZIP_BUF_SIZE > drec->stream.avail_out) {
+-            if (rc == Z_DATA_ERROR) {
+-                // There is data even if there is an error
+-                // So use this data and log a warning
+-                htp_log(d->tx->connp, HTP_LOG_MARK, HTP_LOG_WARNING, 0, "GZip decompressor: inflate failed with %d", rc);
+-                rc = Z_STREAM_END;
+-            }
+-        }
+-        if (rc == Z_STREAM_END) {
++
++	int error_after_data = (rc == Z_DATA_ERROR && drec->restart == 0 && GZIP_BUF_SIZE > drec->stream.avail_out);
++        if (rc == Z_STREAM_END || error_after_data) {
+             // How many bytes do we have?
+             size_t len = GZIP_BUF_SIZE - drec->stream.avail_out;
+ 
+@@ -351,6 +347,13 @@ restart:
+             drec->stream.next_out = drec->buffer;
+             // TODO Handle trailer.
+ 
++            if (error_after_data) {
++                // There is data even if there is an error
++                // So use this data and log a warning
++                htp_log(d->tx->connp, HTP_LOG_MARK, HTP_LOG_WARNING, 0, "GZip decompressor: inflate failed with %d", rc);
++                drec->zlib_initialized = HTP_COMPRESSION_OVER;
++                return HTP_ERROR;
++            }
+             return HTP_OK;
+         }
+         else if (rc != Z_OK) {
+-- 
+2.50.1
+
recipes-ids/suricata/files/CVE-2025-53537-002.patch new file +31 -0
new file mode 100644
index 0000000..ff4f1a0
@@ -0,0 +1,31 @@
+From 9037ea35110a0d97be5cedf8d31fb4cd9a38c7a7 Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Tue, 17 Jun 2025 10:12:47 +0200
+Subject: [PATCH] decompressors: fix leak in lzma error case
+
+Ticket: 7766
+
+CVE: CVE-2025-53537
+Upstream-Status: Backport [https://github.com/OISF/libhtp/commit/9037ea35110a0d97be5cedf8d31fb4cd9a38c7a7]
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ htp/htp_decompressors.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/htp/htp_decompressors.c b/htp/htp_decompressors.c
+index 0d94c30..ce6cfe1 100644
+--- a/htp/htp_decompressors.c
++++ b/htp/htp_decompressors.c
+@@ -351,6 +351,9 @@ restart:
+                 // There is data even if there is an error
+                 // So use this data and log a warning
+                 htp_log(d->tx->connp, HTP_LOG_MARK, HTP_LOG_WARNING, 0, "GZip decompressor: inflate failed with %d", rc);
++                if (drec->zlib_initialized == HTP_COMPRESSION_LZMA) {
++                    LzmaDec_Free(&drec->state, &lzma_Alloc);
++                }
+                 drec->zlib_initialized = HTP_COMPRESSION_OVER;
+                 return HTP_ERROR;
+             }
+-- 
+2.50.1
+
recipes-ids/suricata/libhtp_0.5.45.bb +2 -0
index 604a0ca..b87db35 100644
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=596ab7963a1a0e5198e
 
 SRC_URI = "git://github.com/OISF/libhtp.git;protocol=https;branch=0.5.x \
            file://CVE-2024-45797.patch \
+           file://CVE-2025-53537-001.patch \
+           file://CVE-2025-53537-002.patch \
           "
 SRCREV = "8bdfe7b9d04e5e948c8fbaa7472e14d884cc00af"
 
Signature · 1 line
2.47.3
#23 lore raw

PATCH 21/32 fail2ban: update to 1.1.0+

In reply to Scott Murray

From: Rasmus Villemoes <[email protected]>

Current 1.0.2 version does not work with scarthgap or later releases, as the asynchat module has been removed (as scheduled) from python's stdlib as of v3.12.

fail2ban 1.1.0 also does not work out-of-the-box, as the distutils module which the pyinotify and systemd backends depend has also been removed.

So update the recipe to point at commit ac62658c10f4, which fixes those two backends to no longer depend on distutils.

Upstream's out-of-the-box ban action now uses the 'nft' command. People can still override and customize that in jail.conf/jail.local, but to make the recipe useful without customizing things back to use iptables, change the dependency iptables->nftables.

Since 1.1.0, fail2ban has been python3-only, so the recipe becomes somewhat simpler since the whole do_compile preparation step can be removed.

(update PV)

---
 ...fail2ban_1.0.2.bb => python3-fail2ban_git.bb} | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
 rename dynamic-layers/meta-python/recipes-security/fail2ban/{python3-fail2ban_1.0.2.bb => python3-fail2ban_git.bb} (89%)
dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb renamed from dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_1.0.2.bb +4 -12
similarity index 89%
rename from dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_1.0.2.bb
rename to dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb
index bf5f87d..444574a 100644
@@ -11,12 +11,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecabc31e90311da843753ba772885d9f"
 
 DEPENDS = "python3-native"
 
-SRCREV = "e1d3006b0330e9777705a7baafe3989d442ed120"
+SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78"
 SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \
            file://initd \
            file://run-ptest \
            "
 
+PV = "1.1.0+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 inherit update-rc.d ptest setuptools3_legacy
@@ -26,16 +28,6 @@ SYSTEMD_SERVICE:${PN} = "fail2ban.service"
 
 S = "${WORKDIR}/git"
 
-do_compile () {
-    cd ${S}
-
-    #remove symlink to python3
-    # otherwise 2to3 is run against it
-    rm -f bin/fail2ban-python
-
-    ./fail2ban-2to3
-}
-
 do_install:append () {
     rm  -f ${D}/${bindir}/fail2ban-python
     install -d ${D}/${sysconfdir}/fail2ban
@@ -66,7 +58,7 @@ INITSCRIPT_PARAMS = "defaults 25"
 
 INSANE_SKIP:${PN}:append = "already-stripped"
 
-RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} iptables python3-core python3-pyinotify"
+RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} nftables python3-core python3-pyinotify"
 RDEPENDS:${PN} += "python3-sqlite3"
 RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json"
 RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
Signature · 1 line
2.47.3
#24 lore raw

PATCH 22/32 suricata: Fix multiple CVEs

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Backport fixes for:

* CVE-2024-32663 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/e68ec4b227d19498f364a41eb25d3182f0383ca5 && https://github.com/OISF/suricata/commit/c0af92295e833d1db29b184d63cd3b829451d7fd
* CVE-2024-32664 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/d5ffecf11ad2c6fe89265e518f5d7443caf26ba4
* CVE-2024-32867 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/2f39ba75f153ba9bdf8eedc2a839cc973dbaea66 && https://github.com/OISF/suricata/commit/7137d5e7ab5500f1b7f3391f8ab55a59f1e4cbd7 && https://github.com/OISF/suricata/commit/1e110d0a71db46571040b937e17a4bc9f91d6de9 && https://github.com/OISF/suricata/commit/e6267758ed5da27f804f0c1c07f9423bdf4d72b8

---
 .../suricata/files/CVE-2024-32663-001.patch   | 294 +++++++++
 .../suricata/files/CVE-2024-32663-002.patch   |  70 +++
 .../suricata/files/CVE-2024-32664.patch       |  53 ++
 .../suricata/files/CVE-2024-32867-001.patch   | 235 +++++++
 .../suricata/files/CVE-2024-32867-002.patch   | 591 ++++++++++++++++++
 .../suricata/files/CVE-2024-32867-003.patch   | 472 ++++++++++++++
 .../suricata/files/CVE-2024-32867-004.patch   | 169 +++++
 recipes-ids/suricata/suricata_7.0.0.bb        |   7 +
 8 files changed, 1891 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32663-001.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32663-002.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32664.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32867-001.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32867-002.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32867-003.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-32867-004.patch
recipes-ids/suricata/files/CVE-2024-32663-001.patch new file +294 -0
new file mode 100644
index 0000000..f07904a
@@ -0,0 +1,294 @@
+From e68ec4b227d19498f364a41eb25d3182f0383ca5 Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Wed, 27 Mar 2024 14:33:54 +0100
+Subject: [PATCH] http2: use a reference counter for headers
+
+Ticket: 6892
+
+As HTTP hpack header compression allows one single byte to
+express a previously seen arbitrary-size header block (name+value)
+we should avoid to copy the vectors data, but just point
+to the same data, while reamining memory safe, even in the case
+of later headers eviction from the dybnamic table.
+
+Rust std solution is Rc, and the use of clone, so long as the
+data is accessed by only one thread.
+
+(cherry picked from commit 390f09692eb99809c679d3f350c7cc185d163e1a)
+
+CVE: CVE-2024-32663
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/e68ec4b227d19498f364a41eb25d3182f0383ca5]
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ rust/src/http2/detect.rs | 19 +++++++------
+ rust/src/http2/http2.rs  |  2 +-
+ rust/src/http2/parser.rs | 61 +++++++++++++++++++++-------------------
+ 3 files changed, 43 insertions(+), 39 deletions(-)
+
+diff --git a/rust/src/http2/detect.rs b/rust/src/http2/detect.rs
+index 99261ad..904b9ad 100644
+--- a/rust/src/http2/detect.rs
++++ b/rust/src/http2/detect.rs
+@@ -23,6 +23,7 @@ use crate::core::Direction;
+ use crate::detect::uint::{detect_match_uint, DetectUintData};
+ use std::ffi::CStr;
+ use std::str::FromStr;
++use std::rc::Rc;
+ 
+ fn http2_tx_has_frametype(
+     tx: &mut HTTP2Transaction, direction: Direction, value: u8,
+@@ -404,7 +405,7 @@ fn http2_frames_get_header_firstvalue<'a>(
+     for frame in frames {
+         if let Some(blocks) = http2_header_blocks(frame) {
+             for block in blocks.iter() {
+-                if block.name == name.as_bytes() {
++                if block.name.as_ref() == name.as_bytes() {
+                     return Ok(&block.value);
+                 }
+             }
+@@ -428,7 +429,7 @@ pub fn http2_frames_get_header_value_vec(
+     for frame in frames {
+         if let Some(blocks) = http2_header_blocks(frame) {
+             for block in blocks.iter() {
+-                if block.name == name.as_bytes() {
++                if block.name.as_ref() == name.as_bytes() {
+                     if found == 0 {
+                         vec.extend_from_slice(&block.value);
+                         found = 1;
+@@ -465,7 +466,7 @@ fn http2_frames_get_header_value<'a>(
+     for frame in frames {
+         if let Some(blocks) = http2_header_blocks(frame) {
+             for block in blocks.iter() {
+-                if block.name == name.as_bytes() {
++                if block.name.as_ref() == name.as_bytes() {
+                     if found == 0 {
+                         single = Ok(&block.value);
+                         found = 1;
+@@ -905,8 +906,8 @@ fn http2_tx_set_header(state: &mut HTTP2State, name: &[u8], input: &[u8]) {
+     };
+     let mut blocks = Vec::new();
+     let b = parser::HTTP2FrameHeaderBlock {
+-        name: name.to_vec(),
+-        value: input.to_vec(),
++        name: Rc::new(name.to_vec()),
++        value: Rc::new(input.to_vec()),
+         error: parser::HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess,
+         sizeupdate: 0,
+     };
+@@ -1061,15 +1062,15 @@ mod tests {
+         };
+         let mut blocks = Vec::new();
+         let b = parser::HTTP2FrameHeaderBlock {
+-            name: "Host".as_bytes().to_vec(),
+-            value: "abc.com".as_bytes().to_vec(),
++            name: "Host".as_bytes().to_vec().into(),
++            value: "abc.com".as_bytes().to_vec().into(),
+             error: parser::HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess,
+             sizeupdate: 0,
+         };
+         blocks.push(b);
+         let b2 = parser::HTTP2FrameHeaderBlock {
+-            name: "Host".as_bytes().to_vec(),
+-            value: "efg.net".as_bytes().to_vec(),
++            name: "Host".as_bytes().to_vec().into(),
++            value: "efg.net".as_bytes().to_vec().into(),
+             error: parser::HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess,
+             sizeupdate: 0,
+         };
+diff --git a/rust/src/http2/http2.rs b/rust/src/http2/http2.rs
+index 326030f..d14ca06 100644
+--- a/rust/src/http2/http2.rs
++++ b/rust/src/http2/http2.rs
+@@ -204,7 +204,7 @@ impl HTTP2Transaction {
+ 
+     fn handle_headers(&mut self, blocks: &[parser::HTTP2FrameHeaderBlock], dir: Direction) {
+         for block in blocks {
+-            if block.name == b"content-encoding" {
++            if block.name.as_ref() == b"content-encoding" {
+                 self.decoder.http2_encoding_fromvec(&block.value, dir);
+             }
+         }
+diff --git a/rust/src/http2/parser.rs b/rust/src/http2/parser.rs
+index adabeb2..1a46437 100644
+--- a/rust/src/http2/parser.rs
++++ b/rust/src/http2/parser.rs
+@@ -30,6 +30,7 @@ use nom7::sequence::tuple;
+ use nom7::{Err, IResult};
+ use std::fmt;
+ use std::str::FromStr;
++use std::rc::Rc;
+ 
+ #[repr(u8)]
+ #[derive(Clone, Copy, PartialEq, Eq, FromPrimitive, Debug)]
+@@ -295,8 +296,8 @@ fn http2_frame_header_static(n: u64, dyn_headers: &HTTP2DynTable) -> Option<HTTP
+     };
+     if !name.is_empty() {
+         return Some(HTTP2FrameHeaderBlock {
+-            name: name.as_bytes().to_vec(),
+-            value: value.as_bytes().to_vec(),
++            name: Rc::new(name.as_bytes().to_vec()),
++            value: Rc::new(value.as_bytes().to_vec()),
+             error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess,
+             sizeupdate: 0,
+         });
+@@ -304,23 +305,23 @@ fn http2_frame_header_static(n: u64, dyn_headers: &HTTP2DynTable) -> Option<HTTP
+         //use dynamic table
+         if n == 0 {
+             return Some(HTTP2FrameHeaderBlock {
+-                name: Vec::new(),
+-                value: Vec::new(),
++                name: Rc::new(Vec::new()),
++                value: Rc::new(Vec::new()),
+                 error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeIndex0,
+                 sizeupdate: 0,
+             });
+         } else if dyn_headers.table.len() + HTTP2_STATIC_HEADERS_NUMBER < n as usize {
+             return Some(HTTP2FrameHeaderBlock {
+-                name: Vec::new(),
+-                value: Vec::new(),
++                name: Rc::new(Vec::new()),
++                value: Rc::new(Vec::new()),
+                 error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeNotIndexed,
+                 sizeupdate: 0,
+             });
+         } else {
+             let indyn = dyn_headers.table.len() - (n as usize - HTTP2_STATIC_HEADERS_NUMBER);
+             let headcopy = HTTP2FrameHeaderBlock {
+-                name: dyn_headers.table[indyn].name.to_vec(),
+-                value: dyn_headers.table[indyn].value.to_vec(),
++                name: dyn_headers.table[indyn].name.clone(),
++                value: dyn_headers.table[indyn].value.clone(),
+                 error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess,
+                 sizeupdate: 0,
+             };
+@@ -348,8 +349,10 @@ impl fmt::Display for HTTP2HeaderDecodeStatus {
+ 
+ #[derive(Clone, Debug)]
+ pub struct HTTP2FrameHeaderBlock {
+-    pub name: Vec<u8>,
+-    pub value: Vec<u8>,
++    // Use Rc reference counted so that indexed headers do not get copied.
++    // Otherwise, this leads to quadratic complexity in memory occupation.
++    pub name: Rc<Vec<u8>>,
++    pub value: Rc<Vec<u8>>,
+     pub error: HTTP2HeaderDecodeStatus,
+     pub sizeupdate: u64,
+ }
+@@ -391,7 +394,7 @@ fn http2_parse_headers_block_literal_common<'a>(
+ ) -> IResult<&'a [u8], HTTP2FrameHeaderBlock> {
+     let (i3, name, error) = if index == 0 {
+         match http2_parse_headers_block_string(input) {
+-            Ok((r, n)) => Ok((r, n, HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess)),
++            Ok((r, n)) => Ok((r, Rc::new(n), HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSuccess)),
+             Err(e) => Err(e),
+         }
+     } else {
+@@ -403,7 +406,7 @@ fn http2_parse_headers_block_literal_common<'a>(
+             )),
+             None => Ok((
+                 input,
+-                Vec::new(),
++                Rc::new(Vec::new()),
+                 HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeNotIndexed,
+             )),
+         }
+@@ -413,7 +416,7 @@ fn http2_parse_headers_block_literal_common<'a>(
+         i4,
+         HTTP2FrameHeaderBlock {
+             name,
+-            value,
++            value: Rc::new(value),
+             error,
+             sizeupdate: 0,
+         },
+@@ -435,8 +438,8 @@ fn http2_parse_headers_block_literal_incindex<'a>(
+     match r {
+         Ok((r, head)) => {
+             let headcopy = HTTP2FrameHeaderBlock {
+-                name: head.name.to_vec(),
+-                value: head.value.to_vec(),
++                name: head.name.clone(),
++                value: head.value.clone(),
+                 error: head.error,
+                 sizeupdate: 0,
+             };
+@@ -556,8 +559,8 @@ fn http2_parse_headers_block_dynamic_size<'a>(
+     return Ok((
+         i3,
+         HTTP2FrameHeaderBlock {
+-            name: Vec::new(),
+-            value: Vec::new(),
++            name: Rc::new(Vec::new()),
++            value: Rc::new(Vec::new()),
+             error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeSizeUpdate,
+             sizeupdate: maxsize2,
+         },
+@@ -614,8 +617,8 @@ fn http2_parse_headers_blocks<'a>(
+                 // if we error from http2_parse_var_uint, we keep the first parsed headers
+                 if err.code == ErrorKind::LengthValue {
+                     blocks.push(HTTP2FrameHeaderBlock {
+-                        name: Vec::new(),
+-                        value: Vec::new(),
++                        name: Rc::new(Vec::new()),
++                        value: Rc::new(Vec::new()),
+                         error: HTTP2HeaderDecodeStatus::HTTP2HeaderDecodeIntegerOverflow,
+                         sizeupdate: 0,
+                     });
+@@ -765,8 +768,8 @@ mod tests {
+         match r0 {
+             Ok((remainder, hd)) => {
+                 // Check the first message.
+-                assert_eq!(hd.name, ":method".as_bytes().to_vec());
+-                assert_eq!(hd.value, "GET".as_bytes().to_vec());
++                assert_eq!(hd.name, ":method".as_bytes().to_vec().into());
++                assert_eq!(hd.value, "GET".as_bytes().to_vec().into());
+                 // And we should have no bytes left.
+                 assert_eq!(remainder.len(), 0);
+             }
+@@ -782,8 +785,8 @@ mod tests {
+         match r1 {
+             Ok((remainder, hd)) => {
+                 // Check the first message.
+-                assert_eq!(hd.name, "accept".as_bytes().to_vec());
+-                assert_eq!(hd.value, "*/*".as_bytes().to_vec());
++                assert_eq!(hd.name, "accept".as_bytes().to_vec().into());
++                assert_eq!(hd.value, "*/*".as_bytes().to_vec().into());
+                 // And we should have no bytes left.
+                 assert_eq!(remainder.len(), 0);
+                 assert_eq!(dynh.table.len(), 1);
+@@ -802,8 +805,8 @@ mod tests {
+         match result {
+             Ok((remainder, hd)) => {
+                 // Check the first message.
+-                assert_eq!(hd.name, ":authority".as_bytes().to_vec());
+-                assert_eq!(hd.value, "localhost:3000".as_bytes().to_vec());
++                assert_eq!(hd.name, ":authority".as_bytes().to_vec().into());
++                assert_eq!(hd.value, "localhost:3000".as_bytes().to_vec().into());
+                 // And we should have no bytes left.
+                 assert_eq!(remainder.len(), 0);
+                 assert_eq!(dynh.table.len(), 2);
+@@ -820,8 +823,8 @@ mod tests {
+         match r3 {
+             Ok((remainder, hd)) => {
+                 // same as before
+-                assert_eq!(hd.name, ":authority".as_bytes().to_vec());
+-                assert_eq!(hd.value, "localhost:3000".as_bytes().to_vec());
++                assert_eq!(hd.name, ":authority".as_bytes().to_vec().into());
++                assert_eq!(hd.value, "localhost:3000".as_bytes().to_vec().into());
+                 // And we should have no bytes left.
+                 assert_eq!(remainder.len(), 0);
+                 assert_eq!(dynh.table.len(), 2);
+@@ -856,8 +859,8 @@ mod tests {
+         match r2 {
+             Ok((remainder, hd)) => {
+                 // Check the first message.
+-                assert_eq!(hd.name, ":path".as_bytes().to_vec());
+-                assert_eq!(hd.value, "/doc/manual/html/index.html".as_bytes().to_vec());
++                assert_eq!(hd.name, ":path".as_bytes().to_vec().into());
++                assert_eq!(hd.value, "/doc/manual/html/index.html".as_bytes().to_vec().into());
+                 // And we should have no bytes left.
+                 assert_eq!(remainder.len(), 0);
+                 assert_eq!(dynh.table.len(), 2);
+-- 
+2.50.1
+
recipes-ids/suricata/files/CVE-2024-32663-002.patch new file +70 -0

70 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32664.patch new file +53 -0

53 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-001.patch new file +235 -0

235 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-002.patch new file +591 -0

591 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-003.patch new file +472 -0

472 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-004.patch new file +169 -0

169 lines not on this page · raw message

recipes-ids/suricata/suricata_7.0.0.bb +7 -0
index 9618c45..4a1857e 100644
@@ -24,6 +24,13 @@ SRC_URI += " \
     file://CVE-2025-29916-03.patch \
     file://CVE-2025-29917.patch \
     file://CVE-2025-29918.patch \
+    file://CVE-2024-32663-001.patch \
+    file://CVE-2024-32663-002.patch \
+    file://CVE-2024-32664.patch \
+    file://CVE-2024-32867-001.patch \
+    file://CVE-2024-32867-002.patch \
+    file://CVE-2024-32867-003.patch \
+    file://CVE-2024-32867-004.patch \
     "
 
 inherit autotools pkgconfig python3native systemd ptest cargo cargo-update-recipe-crates
Signature · 1 line
2.47.3
#25 lore raw

PATCH 23/32 suricata: fix CVE-2024-55627 && CVE-2024-55628

In reply to Scott Murray

From: Hitendra Prajapati <[email protected]>

Backport fixes for:

* CVE-2024-55627 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/0dc364aef2dec122fc0e7ee4c190864f4cc5f1bd && https://github.com/OISF/suricata/commit/949bfeca0e5f92212dc3d79f4a87c7c482d376aa && https://github.com/OISF/suricata/commit/7d47fcf7f7fefacd2b0d8f482534a83b35a3c45e
* CVE-2024-55628 - Upstream-Status: Backport from https://github.com/OISF/suricata/commit/58c41a7fa99f62d9a8688e970ab1a9b09c79723a && https://github.com/OISF/suricata/commit/284ad462fcb2e47f1518a1abc19e27ca84c6972e && https://github.com/OISF/suricata/commit/5edb84fe234f47a0fedfbf9b10b49699152fe8cb && https://github.com/OISF/suricata/commit/71212b78bd1b7b841c9d9a907d0b3eea71a54060

---
 .../suricata/files/CVE-2024-55627-001.patch   |   59 +
 .../suricata/files/CVE-2024-55627-002.patch   |   44 +
 .../suricata/files/CVE-2024-55627-003.patch   |   41 +
 .../suricata/files/CVE-2024-55628-001.patch   |  738 +++
 .../suricata/files/CVE-2024-55628-002.patch   | 4877 +++++++++++++++++
 .../suricata/files/CVE-2024-55628-003.patch   |  114 +
 .../suricata/files/CVE-2024-55628-004.patch   |  510 ++
 recipes-ids/suricata/suricata_7.0.0.bb        |    7 +
 8 files changed, 6390 insertions(+)
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55627-001.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55627-002.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55627-003.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55628-001.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55628-002.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55628-003.patch
 create mode 100644 recipes-ids/suricata/files/CVE-2024-55628-004.patch
recipes-ids/suricata/files/CVE-2024-55627-001.patch new file +59 -0
new file mode 100644
index 0000000..50b4f06
@@ -0,0 +1,59 @@
+From 0dc364aef2dec122fc0e7ee4c190864f4cc5f1bd Mon Sep 17 00:00:00 2001
+From: Philippe Antoine <[email protected]>
+Date: Thu, 21 Nov 2024 14:55:32 +0100
+Subject: [PATCH] util/streaming-buffer: fix regions intersection
+
+This was not a problem for current callers in Suricata,
+as RegionsIntersect is only called through StreamingBufferInsertAt
+which is only used by TCP...
+
+And TCP uses default region gap = 256kb, and only calls
+StreamingBufferInsertAt with a u16, so TCP never inserts a new
+data that will strictly contain an existing region augmented
+with region gap, which was the only case where RegionsIntersect
+returned the wrong result, which could later lead to a
+buffer overflow.
+
+Ticket: 7393
+(cherry picked from commit 282509f70c4ce805098e59535af445362e3e9ebd)
+
+CVE: CVE-2024-55627
+Upstream-Status: Backport [https://github.com/OISF/suricata/commit/0dc364aef2dec122fc0e7ee4c190864f4cc5f1bd]
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ src/util-streaming-buffer.c | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/src/util-streaming-buffer.c b/src/util-streaming-buffer.c
+index 7608b50..d1d20e8 100644
+--- a/src/util-streaming-buffer.c
++++ b/src/util-streaming-buffer.c
+@@ -133,17 +133,14 @@ static inline bool RegionsIntersect(const StreamingBuffer *sb, const StreamingBu
+     SCLogDebug("r %p: %" PRIu64 "/%" PRIu64 " - adjusted %" PRIu64 "/%" PRIu64, r, r->stream_offset,
+             r->stream_offset + r->buf_size, reg_o, reg_re);
+     /* check if data range intersects with region range */
+-    if (offset >= reg_o && offset <= reg_re) {
+-        SCLogDebug("r %p is in-scope", r);
+-        return true;
+-    }
+-    if (re >= reg_o && re <= reg_re) {
+-        SCLogDebug("r %p is in-scope: %" PRIu64 " >= %" PRIu64 " && %" PRIu64 " <= %" PRIu64, r, re,
+-                reg_o, re, reg_re);
+-        return true;
+-    }
+-    SCLogDebug("r %p is out of scope: %" PRIu64 "/%" PRIu64, r, offset, re);
+-    return false;
++    /* [offset:re] and [reg_o:reg_re] do not intersect if and only if
++     * re < reg_o or if reg_re < offset (one segment is strictly before the other)
++     * trusting that offset<=re and reg_o<=reg_re
++     */
++    if (re < reg_o || reg_re < offset) {
++        return false;
++    }
++    return true;
+ }
+ 
+ /** \internal
+-- 
+2.50.1
+
recipes-ids/suricata/files/CVE-2024-55627-002.patch new file +44 -0

44 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55627-003.patch new file +41 -0

41 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-001.patch new file +738 -0

738 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-002.patch new file +4877 -0

2,118 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-003.patch new file +114 -0

114 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-004.patch new file +510 -0

510 lines not on this page · raw message

recipes-ids/suricata/suricata_7.0.0.bb +7 -0
index 4a1857e..58ed688 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.47.3

Part of the diff is not shown here. View the raw message.

#26 lore raw

PATCH 24/32 python3-fail2ban: fix ptest failures

In reply to Scott Murray

From: Yi Zhao <[email protected]>

Fix ptest failures by backporting patch and updating test case config files.

Before the patch:

  $ ptest-runner python3-fail2ban
  START: ptest-runner
  2025-09-11T15:42
  BEGIN: /usr/lib64/python3-fail2ban/ptest
  <snip>
  Ran 524 tests in 23.023s

FAILED (failures=5, errors=7, skipped=3)
DURATION: 24
END: /usr/lib64/python3-fail2ban/ptest
2025-09-11T15:42
STOP: ptest-runner
TOTAL: 1 FAIL: 1

After the patch:

  $ ptest-runner python3-fail2ban
  START: ptest-runner
  2025-09-11T15:59
  BEGIN: /usr/lib64/python3-fail2ban/ptest
  <snip>
  Ran 524 tests in 25.982s

OK (skipped=3)
DURATION: 27
END: /usr/lib64/python3-fail2ban/ptest
2025-09-11T15:59
STOP: ptest-runner
TOTAL: 1 FAIL: 0

---
 ...ges-the-IPs-again.-additionally-it-g.patch | 210 ++++++++++++++++++
 ...case.py-set-correct-config-dir-for-t.patch |  34 +++
 .../fail2ban/python3-fail2ban_git.bb          |  12 +-
 3 files changed, 255 insertions(+), 1 deletion(-)
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch
dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch new file +210 -0
new file mode 100644
index 0000000..73014ab
@@ -0,0 +1,210 @@
+From 5b6c13f0aae79a23d94570bacd1b5796e57f088d Mon Sep 17 00:00:00 2001
+From: sebres <[email protected]>
+Date: Thu, 30 Jan 2025 01:05:30 +0100
+Subject: [PATCH] example.com changes the IPs, again... additionally it got
+ more IPs, which look unstable now (depends on resolver), so replaced with
+ fail2ban.org, that seems to resolve to single IPv4 and IPv6 (can be adjusted
+ later for something more persistent)
+
+
+Upstream-Status: Backport
+[https://github.com/fail2ban/fail2ban/commit/5b6c13f0aae79a23d94570bacd1b5796e57f088d]
+
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ .../tests/files/logs/apache-fakegooglebot     |  6 +-
+ fail2ban/tests/files/testcase-usedns.log      |  4 +-
+ fail2ban/tests/filtertestcase.py              | 58 +++++++++----------
+ fail2ban/tests/utils.py                       |  4 +-
+ 4 files changed, 36 insertions(+), 36 deletions(-)
+
+diff --git a/fail2ban/tests/files/logs/apache-fakegooglebot b/fail2ban/tests/files/logs/apache-fakegooglebot
+index b77a1a6b..024842fd 100644
+--- a/fail2ban/tests/files/logs/apache-fakegooglebot
++++ b/fail2ban/tests/files/logs/apache-fakegooglebot
+@@ -1,5 +1,5 @@
+ # Apache 2.2
+ # failJSON: { "time": "2015-01-31T14:29:44", "match": true, "host": "66.249.66.1" }
+-66.249.66.1 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546
+-# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "93.184.215.14" }
+-93.184.215.14 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546
++66.249.66.1 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546
++# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "51.159.55.100" }
++51.159.55.100 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546
+diff --git a/fail2ban/tests/files/testcase-usedns.log b/fail2ban/tests/files/testcase-usedns.log
+index eea6eb44..3e7b36bb 100644
+--- a/fail2ban/tests/files/testcase-usedns.log
++++ b/fail2ban/tests/files/testcase-usedns.log
+@@ -1,2 +1,2 @@
+-Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2
+-Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2
++Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2
++Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2
+diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py
+index 20945b78..26961a1b 100644
+--- a/fail2ban/tests/filtertestcase.py
++++ b/fail2ban/tests/filtertestcase.py
+@@ -587,14 +587,14 @@ class IgnoreIP(LogCaptureTestCase):
+ 				self.assertNotLogged("returned successfully")
+ 
+ 	def testIgnoreCauseOK(self):
+-		ip = "93.184.215.14"
++		ip = "51.159.55.100"
+ 		for ignore_source in ["dns", "ip", "command"]:
+ 			self.filter.logIgnoreIp(ip, True, ignore_source=ignore_source)
+ 			self.assertLogged("[%s] Ignore %s by %s" % (self.jail.name, ip, ignore_source))
+ 
+ 	def testIgnoreCauseNOK(self):
+-		self.filter.logIgnoreIp("example.com", False, ignore_source="NOT_LOGGED")
+-		self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "example.com", "NOT_LOGGED"))
++		self.filter.logIgnoreIp("fail2ban.org", False, ignore_source="NOT_LOGGED")
++		self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "fail2ban.org", "NOT_LOGGED"))
+ 
+ 
+ class IgnoreIPDNS(LogCaptureTestCase):
+@@ -607,7 +607,7 @@ class IgnoreIPDNS(LogCaptureTestCase):
+ 		self.filter = FileFilter(self.jail)
+ 
+ 	def testIgnoreIPDNS(self):
+-		for dns in ("www.epfl.ch", "example.com"):
++		for dns in ("www.epfl.ch", "fail2ban.org"):
+ 			self.filter.addIgnoreIP(dns)
+ 			ips = DNSUtils.dnsToIp(dns)
+ 			self.assertTrue(len(ips) > 0)
+@@ -1892,22 +1892,22 @@ class GetFailures(LogCaptureTestCase):
+ 		#unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils.
+ 		# We should still catch failures with usedns = no ;-)
+ 		output_yes = (
+-			('93.184.215.14', 1, 1124013299.0,
+-			  ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2']
++			('51.159.55.100', 1, 1124013299.0,
++			  ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2']
+ 			),
+-			('93.184.215.14', 1, 1124013539.0,
+-			  ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2']
++			('51.159.55.100', 1, 1124013539.0,
++			  ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2']
+ 			),
+-			('2606:2800:21f:cb07:6820:80da:af6b:8b2c', 1, 1124013299.0,
+-			  ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2']
++			('2001:bc8:1200:6:208:a2ff:fe0c:61f8', 1, 1124013299.0,
++			  ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2']
+ 			),
+ 		)
+ 		if not unittest.F2B.no_network and not DNSUtils.IPv6IsAllowed():
+ 			output_yes = output_yes[0:2]
+ 
+ 		output_no = (
+-			('93.184.215.14', 1, 1124013539.0,
+-			  ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2']
++			('51.159.55.100', 1, 1124013539.0,
++			  ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2']
+ 			)
+ 		)
+ 
+@@ -2098,10 +2098,10 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 		super(DNSUtilsNetworkTests, self).setUp()
+ 		#unittest.F2B.SkipIfNoNetwork()
+ 
+-	## example.com IPs considering IPv6 support (without network it is simulated via cache in utils).
++	## fail2ban.org IPs considering IPv6 support (without network it is simulated via cache in utils).
+ 	EXAMPLE_ADDRS = (
+-		['93.184.215.14', '2606:2800:21f:cb07:6820:80da:af6b:8b2c'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \
+-		['93.184.215.14']
++		['51.159.55.100', '2001:bc8:1200:6:208:a2ff:fe0c:61f8'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \
++		['51.159.55.100']
+ 	)
+ 
+ 	def test_IPAddr(self):
+@@ -2163,13 +2163,13 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 		self.assertTrue(r < ip6)
+ 
+ 	def testUseDns(self):
+-		res = DNSUtils.textToIp('www.example.com', 'no')
++		res = DNSUtils.textToIp('www.fail2ban.org', 'no')
+ 		self.assertSortedEqual(res, [])
+ 		#unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils.
+-		res = DNSUtils.textToIp('www.example.com', 'warn')
++		res = DNSUtils.textToIp('www.fail2ban.org', 'warn')
+ 		# sort ipaddr, IPv4 is always smaller as IPv6
+ 		self.assertSortedEqual(res, self.EXAMPLE_ADDRS)
+-		res = DNSUtils.textToIp('www.example.com', 'yes')
++		res = DNSUtils.textToIp('www.fail2ban.org', 'yes')
+ 		# sort ipaddr, IPv4 is always smaller as IPv6
+ 		self.assertSortedEqual(res, self.EXAMPLE_ADDRS)
+ 
+@@ -2177,13 +2177,13 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 		#unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils.
+ 		# Test hostnames
+ 		hostnames = [
+-			'www.example.com',
++			'www.fail2ban.org',
+ 			'doh1.2.3.4.buga.xxxxx.yyy.invalid',
+ 			'1.2.3.4.buga.xxxxx.yyy.invalid',
+ 			]
+ 		for s in hostnames:
+ 			res = DNSUtils.textToIp(s, 'yes')
+-			if s == 'www.example.com':
++			if s == 'www.fail2ban.org':
+ 				# sort ipaddr, IPv4 is always smaller as IPv6
+ 				self.assertSortedEqual(res, self.EXAMPLE_ADDRS)
+ 			else:
+@@ -2234,8 +2234,8 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 
+ 		self.assertEqual(IPAddr('192.0.2.0').getPTR(), '0.2.0.192.in-addr.arpa.')
+ 		self.assertEqual(IPAddr('192.0.2.1').getPTR(), '1.2.0.192.in-addr.arpa.')
+-		self.assertEqual(IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c').getPTR(), 
+-			'c.2.b.8.b.6.f.a.a.d.0.8.0.2.8.6.7.0.b.c.f.1.2.0.0.0.8.2.6.0.6.2.ip6.arpa.')
++		self.assertEqual(IPAddr('2001:db8::1').getPTR(), 
++			'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.')
+ 
+ 	def testIPAddr_Equal6(self):
+ 		self.assertEqual(
+@@ -2365,10 +2365,10 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 
+ 	def testIPAddr_CompareDNS(self):
+ 		#unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils.
+-		ips = IPAddr('example.com')
+-		self.assertTrue(IPAddr("93.184.215.14").isInNet(ips))
+-		self.assertEqual(IPAddr("2606:2800:21f:cb07:6820:80da:af6b:8b2c").isInNet(ips),
+-		                        "2606:2800:21f:cb07:6820:80da:af6b:8b2c" in self.EXAMPLE_ADDRS)
++		ips = IPAddr('fail2ban.org')
++		self.assertTrue(IPAddr("51.159.55.100").isInNet(ips))
++		self.assertEqual(IPAddr("2001:bc8:1200:6:208:a2ff:fe0c:61f8").isInNet(ips),
++		                        "2001:bc8:1200:6:208:a2ff:fe0c:61f8" in self.EXAMPLE_ADDRS)
+ 
+ 	def testIPAddr_wrongDNS_IP(self):
+ 		unittest.F2B.SkipIfNoNetwork()
+@@ -2376,11 +2376,11 @@ class DNSUtilsNetworkTests(unittest.TestCase):
+ 		DNSUtils.ipToName('*')
+ 
+ 	def testIPAddr_Cached(self):
+-		ips = [DNSUtils.dnsToIp('example.com'), DNSUtils.dnsToIp('example.com')]
++		ips = [DNSUtils.dnsToIp('fail2ban.org'), DNSUtils.dnsToIp('fail2ban.org')]
+ 		for ip1, ip2 in zip(ips, ips):
+ 			self.assertEqual(id(ip1), id(ip2))
+-		ip1 = IPAddr('93.184.215.14'); ip2 = IPAddr('93.184.215.14'); self.assertEqual(id(ip1), id(ip2))
+-		ip1 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); ip2 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); self.assertEqual(id(ip1), id(ip2))
++		ip1 = IPAddr('51.159.55.100'); ip2 = IPAddr('51.159.55.100'); self.assertEqual(id(ip1), id(ip2))
++		ip1 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); ip2 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); self.assertEqual(id(ip1), id(ip2))
+ 
+ 	def test_NetworkInterfacesAddrs(self):
+ 		for withMask in (False, True):
+diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py
+index f71ba60a..e6ef54f3 100644
+--- a/fail2ban/tests/utils.py
++++ b/fail2ban/tests/utils.py
+@@ -326,8 +326,8 @@ def initTests(opts):
+ 			('failed.dns.ch', set()),
+ 			('doh1.2.3.4.buga.xxxxx.yyy.invalid', set()),
+ 			('1.2.3.4.buga.xxxxx.yyy.invalid', set()),
+-			('example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])),
+-			('www.example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])),
++			('fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])),
++			('www.fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])),
+ 		):
+ 			c.set(*i)
+ 		# if fast - precache all host names as localhost addresses (speed-up getSelfIPs/ignoreself):
+-- 
+2.34.1
+
dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch new file +34 -0
new file mode 100644
index 0000000..ab957da
@@ -0,0 +1,34 @@
+From 9137d3f47a9e0c0e1aad11a71bb8ac8d0ba21b4e Mon Sep 17 00:00:00 2001
+From: Yi Zhao <[email protected]>
+Date: Thu, 11 Sep 2025 22:36:07 +0800
+Subject: [PATCH] clientreadertestcase.py: set correct config dir for
+ testReadStockJailFilterComplete
+
+In test case testReadStockJailFilterComplete, set configuration
+directory to CONFIG_DIR (/etc/fail2ban/filter.d on the target) instead
+of the hardcoded "config" directory. Otherwise, the config files will
+not be found during runtime testing.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ fail2ban/tests/clientreadertestcase.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fail2ban/tests/clientreadertestcase.py b/fail2ban/tests/clientreadertestcase.py
+index 0388fd3d..670e5b76 100644
+--- a/fail2ban/tests/clientreadertestcase.py
++++ b/fail2ban/tests/clientreadertestcase.py
+@@ -861,7 +861,7 @@ class JailsReaderTest(LogCaptureTestCase):
+ 		self.assertTrue(jails.getOptions())       # reads fine
+ 		# grab all filter names
+ 		filters = set(os.path.splitext(os.path.split(a)[1])[0]
+-			for a in glob.glob(os.path.join('config', 'filter.d', '*.conf'))
++			for a in glob.glob(os.path.join(CONFIG_DIR, 'filter.d', '*.conf'))
+ 				if not (a.endswith('common.conf') or a.endswith('-aggressive.conf')))
+ 		# get filters of all jails (filter names without options inside filter[...])
+ 		filters_jail = set(
+-- 
+2.34.1
+
dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +11 -1
index 444574a..eb20a88 100644
@@ -13,6 +13,8 @@ DEPENDS = "python3-native"
 
 SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78"
 SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \
+           file://0001-example.com-changes-the-IPs-again.-additionally-it-g.patch \
+           file://0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch \
            file://initd \
            file://run-ptest \
            "
@@ -49,8 +51,16 @@ do_install_ptest:append () {
     sed -i -e 's/##PYTHON##/python3/g' ${D}${PTEST_PATH}/run-ptest
     install -D ${S}/bin/* ${D}${PTEST_PATH}/bin
     rm -f ${D}${PTEST_PATH}/bin/fail2ban-python
-}
 
+    for i in checklogtype.conf zzz-generic-example.conf zzz-sshd-obsolete-multiline.conf; do
+        sed -i -e 's|^before =.*|before = ${sysconfdir}/fail2ban/filter.d/common.conf|g' \
+            ${D}${PYTHON_SITEPACKAGES_DIR}/fail2ban/tests/config/filter.d/${i}
+    done
+
+    install -m 0644 ${S}/README.md ${D}${PTEST_PATH}
+    sed -i -e 's|^logpath = README.md|logpath = ${PTEST_PATH}/README.md|g' \
+            ${D}${PYTHON_SITEPACKAGES_DIR}/fail2ban/tests/config/jail.conf
+}
 
 INITSCRIPT_PACKAGES = "${PN}"
 INITSCRIPT_NAME = "fail2ban-server"
Signature · 1 line
2.47.3
#27 lore raw

PATCH 25/32 fail2ban: Adapt test output to Automake format for ptest compatibility

In reply to Scott Murray

From: Haixiao Yan <[email protected]>

Convert fail2ban-testcases output to follow Automake-compatible format (PASS:/FAIL:) so that ptest-runner can correctly parse and report test results.

root@intel-x86-64:~# ptest-runner python3-fail2ban -t 300
START: ptest-runner
2025-09-22T07:57
BEGIN: /usr/lib64/python3-fail2ban/ptest
Fail2ban 1.1.1.dev1 test suite. Python 3.12.11 (main, Jun  3 2025, 15:41:47) [GCC 13.4.0]. Please wait...
I: Skipping smtp tests: No module named 'smtpd'
I: Skipping SSL smtp tests: No module named 'aiosmtpd'
PASS: fail2ban.tests.servertestcase.Transmitter.testAction
PASS: fail2ban.tests.servertestcase.Transmitter.testAddJail
PASS: fail2ban.tests.servertestcase.Transmitter.testDatabase
PASS: fail2ban.tests.servertestcase.Transmitter.testDatePattern
PASS: fail2ban.tests.servertestcase.Transmitter.testGetNOK
PASS: fail2ban.tests.servertestcase.Transmitter.testJailAttemptIP
PASS: fail2ban.tests.servertestcase.Transmitter.testJailBanIP
...
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testBanTimeIncr
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testFlushLogs
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogLevel
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogTarget
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogTargetSYSLOG
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testSyslogSocket
PASS: fail2ban.tests.servertestcase.TransmitterLogging.testSyslogSocketNOK

============================================================================
Testsuite summary
DURATION: 48
END: /usr/lib64/python3-fail2ban/ptest
2025-09-22T07:58
STOP: ptest-runner
TOTAL: 1 FAIL: 0

---
 ...ao.unittest.TestRunner-for-ptest-out.patch | 43 +++++++++++++++++++
 .../fail2ban/python3-fail2ban_git.bb          |  9 +++-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch
dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch new file +43 -0
new file mode 100644
index 0000000..c6729cc
@@ -0,0 +1,43 @@
+From 7b42974b5bf20d9db8e788e9d6817004556d660d Mon Sep 17 00:00:00 2001
+From: Haixiao Yan <[email protected]>
+Date: Fri, 19 Sep 2025 15:03:56 +0800
+Subject: [PATCH] fail2ban: use putao.unittest.TestRunner for ptest output
+
+Switch the test runner from unittest's default TextTestRunner to
+putao.unittest.TestRunner (provided by unittest-automake-output) so
+that results are reported in Automake-compatible PASS/FAIL format.
+This enables ptest-runner to correctly parse and summarize individual
+test results.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haixiao Yan <[email protected]>
+---
+ bin/fail2ban-testcases | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bin/fail2ban-testcases b/bin/fail2ban-testcases
+index 48aae4b5ffdc..20db4a01a3d6 100755
+--- a/bin/fail2ban-testcases
++++ b/bin/fail2ban-testcases
+@@ -28,7 +28,7 @@ import logging
+ import os
+ import sys
+ import time
+-import unittest
++import putao.unittest
+ 
+ # Check if local fail2ban module exists, and use if it exists by
+ # modifying the path. This is done so that tests can be used in dev
+@@ -63,7 +63,7 @@ tests = gatherTests(regexps, opts)
+ #
+ # Run the tests
+ #
+-testRunner = unittest.TextTestRunner(verbosity=verbosity)
++testRunner = putao.unittest.TestRunner() 
+ 
+ tests_results = testRunner.run(tests)
+ 
+-- 
+2.34.1
+
dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +8 -1
index eb20a88..72a932b 100644
@@ -15,6 +15,7 @@ SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78"
 SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \
            file://0001-example.com-changes-the-IPs-again.-additionally-it-g.patch \
            file://0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch \
+           file://0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch \
            file://initd \
            file://run-ptest \
            "
@@ -71,6 +72,12 @@ INSANE_SKIP:${PN}:append = "already-stripped"
 RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} nftables python3-core python3-pyinotify"
 RDEPENDS:${PN} += "python3-sqlite3"
 RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json"
-RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
+RDEPENDS:${PN}-ptest = " \
+    python3-core \
+    python3-io \
+    python3-modules \
+    python3-fail2ban \
+    python3-unittest-automake-output \
+    "
 
 RRECOMMENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'python3-systemd', '', d)}"
Signature · 1 line
2.47.3
#28 lore raw

PATCH 26/32 fail2ban: replace fail2ban-python shebang with python3

In reply to Scott Murray

From: Haixiao Yan <[email protected]>

In Yocto, there is only one Python interpreter (python3), and the auto-generated "fail2ban-python" symlink is not used. To ensure all installed scripts can run correctly, replace the shebang line from "#!/usr/bin/env fail2ban-python" to "#!/usr/bin/env python3" during installation.

---
 .../recipes-security/fail2ban/python3-fail2ban_git.bb          | 3 +++
 1 file changed, 3 insertions(+)
dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +3 -0
index 72a932b..e95048f 100644
@@ -44,6 +44,7 @@ do_install:append () {
 
     chown -R root:root ${D}/${bindir}
     rm -rf ${D}/run
+    find ${D}${sysconfdir} -type f -exec sed -i '1s/env fail2ban-python/env python3/' {} +
 }
 
 do_install_ptest:append () {
@@ -61,6 +62,8 @@ do_install_ptest:append () {
     install -m 0644 ${S}/README.md ${D}${PTEST_PATH}
     sed -i -e 's|^logpath = README.md|logpath = ${PTEST_PATH}/README.md|g' \
             ${D}${PYTHON_SITEPACKAGES_DIR}/fail2ban/tests/config/jail.conf
+    find ${D}${PYTHON_SITEPACKAGES_DIR} -type f -exec sed -i \
+            '1s/env fail2ban-python/env python3/' {} +
 }
 
 INITSCRIPT_PACKAGES = "${PN}"
Signature · 1 line
2.47.3
#29 lore raw

PATCH 27/32 suricata: resolve TMPDIR QA issues in do_configure

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

ERROR: suricata-7.0.0-r0 do_package_qa: QA Issue: File /usr/bin/suricata in package suricata contains reference to TMPDIR [buildpaths]

ERROR: suricata-7.0.0-r0 do_package_qa: QA Issue: File /usr/src/debug/suricata/7.0.0/src/build-info.h in package suricata-src contains reference to TMPDIR [buildpaths]

Address references when src/build-info.h is being written

This is similar to Debian's approach:
https://sources.debian.org/patches/suricata/1:7.0.10-1~bpo12%2B1/reproducible.patch/

Restore the "already-stripped" check and CFLAGS info

Original resolution in commit c0e3fecc3bea ("suricata: fix QA warnings")

(cherry picked from commit 277bf8f9160540d582fec58f0f2139b4e4aebef0)
---
 recipes-ids/suricata/suricata_7.0.0.bb | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
recipes-ids/suricata/suricata_7.0.0.bb +16 -0
index 58ed688..e2e94e2 100644
@@ -85,9 +85,25 @@ do_configure:prepend () {
     # use host for RUST_SURICATA_LIB_XC_DIR
     sed -i -e 's,\${host_alias},${RUST_HOST_SYS},' ${S}/configure.ac
     sed -i -e 's,libsuricata_rust.a,libsuricata.a,' ${S}/configure.ac
+    # Address build configuration written to src/build-info.h
+    sed -i -e 's,\(| sed -e '\''s/^/"/'\''\)\( |\),\1 -e '\''s#${WORKDIR}#\\.#g'\''\2,' ${S}/configure.ac
     oe_runconf
 }
 
+CFLAGS += "-Wno-error=incompatible-pointer-types"
+
+# Commit 7a2b9acef2 cargo: pass PACKAGECONFIG_CONFARGS to cargo build
+# breaks building this recipe. Providing a copy of the original function
+# Armin 2025/04/01
+#
+oe_cargo_build () {
+    export RUSTFLAGS="${RUSTFLAGS}"
+    bbnote "Using rust targets from ${RUST_TARGET_PATH}"
+    bbnote "cargo = $(which ${CARGO})"
+    bbnote "${CARGO} build ${CARGO_BUILD_FLAGS}$@"
+    "${CARGO}" build ${CARGO_BUILD_FLAGS}"$@"
+}
+
 do_compile () {
     # we do this to bypass the make provided by this pkg 
     # patches Makefile to skip the subdir
Signature · 1 line
2.47.3
#30 lore raw

PATCH 28/32 suricata: drop pkg_postinst_ontarget systemd init

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

/var/log/suricata initialization is handled by systemd-tmpfiles-setup.service, which occurs before services like suricata

Work towards resolving:
ERROR: [...] do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['100-suricata']

Added in commit 36d656fe7244 ("suricata: add tmpfiles.d config")

systemd testing:

root@beaglebone-yocto:~# ls -d /var/log/suricata
/var/log/suricata
root@beaglebone-yocto:~# systemctl enable suricata
Created symlink '/etc/systemd/system/multi-user.target.wants/suricata.service' -> '/usr/lib/systemd/system/suricata.service'.
root@beaglebone-yocto:~# rmdir /var/log/suricata
root@beaglebone-yocto:~# reboot now
root@beaglebone-yocto:~# ls -d /var/log/suricata
/var/log/suricata
root@beaglebone-yocto:~# journalctl -o short-iso-precise -u systemd-tmpfiles-setup -u suricata
2025-05-20T00:45:46.450027+00:00 beaglebone-yocto systemd[1]: Starting Create System Files and Directories...
[...]
2025-05-20T00:45:47.041049+00:00 beaglebone-yocto systemd[1]: Finished Create System Files and Directories.
2025-05-20T00:45:47.542976+00:00 beaglebone-yocto systemd[1]: Started Suricata IDS/IDP daemon.
[...]
(cherry picked from commit 9109f7258dc60c88985869ceff5ca3523cd01400)
---
 recipes-ids/suricata/suricata_7.0.0.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
recipes-ids/suricata/suricata_7.0.0.bb +1 -3
index e2e94e2..7a6b930 100644
@@ -148,9 +148,7 @@ do_install () {
 }
 
 pkg_postinst_ontarget:${PN} () {
-if command -v systemd-tmpfiles >/dev/null; then
-    systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/suricata.conf
-elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+if [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
     ${sysconfdir}/init.d/populate-volatile.sh update
 fi
 }
Signature · 1 line
2.47.3
#31 lore raw

PATCH 29/32 suricata: fix "interface" arg in systemd service

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

Fix service startup

https://docs.suricata.io/en/suricata-7.0.0/command-line-options.html#cmdoption-i

(cherry picked from commit ca34a66f82caa95b6469f2dee5be6c26bbe2cecc)
---
 recipes-ids/suricata/files/suricata.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-ids/suricata/files/suricata.service +1 -1
index a99a76e..bd7010d 100644
@@ -9,7 +9,7 @@ Documentation=https://redmine.openinfosecfoundation.org/projects/suricata/wiki
 Type=simple
 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
 RestrictAddressFamilies=
-ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml eth0
+ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml -i eth0
 ExecReload=/bin/kill -HUP $MAINPID
 PrivateTmp=yes
 ProtectHome=yes
Signature · 1 line
2.47.3
#32 lore raw

PATCH 30/32 suricata: install classification, reference configs

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

suricata.yaml references these configs

Resolve:
<Warning> -- could not open: "/etc/suricata/classification.config": No such file or directory

<Error> -- please check the "classification-file" option in your suricata.yaml file

(cherry picked from commit 9a49fcbd05e46cafb0a2300a035a9528242bd4b2)
---
 recipes-ids/suricata/suricata_7.0.0.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-ids/suricata/suricata_7.0.0.bb +2 -0
index 7a6b930..021575f 100644
@@ -122,6 +122,8 @@ do_install () {
     install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles
     install -m 0644 ${WORKDIR}/volatiles.03_suricata  ${D}${sysconfdir}/default/volatiles/03_suricata
 
+    install -m 0644 ${S}/etc/classification.config ${D}${sysconfdir}/suricata
+    install -m 0644 ${S}/etc/reference.config ${D}${sysconfdir}/suricata
     install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata
     install -m 0644 ${S}/suricata.yaml ${D}${sysconfdir}/suricata
 
Signature · 1 line
2.47.3
#33 lore raw

PATCH 31/32 suricata: populate SYSTEMD_SERVICE for service autostart

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-SYSTEMD_SERVICE

Before:

root@beaglebone-yocto:~# systemctl status suricata
* suricata.service - Suricata IDS/IDP daemon
     Loaded: loaded (/usr/lib/systemd/system/suricata.service; disabled; preset: disabled)
     Active: inactive (dead)
       Docs: man:suricata(8)
             man:suricatasc(8)
             https://redmine.openinfosecfoundation.org/projects/suricata/wiki

After:

root@beaglebone-yocto:~# systemctl status suricata
* suricata.service - Suricata IDS/IDP daemon
     Loaded: loaded (/usr/lib/systemd/system/suricata.service; enabled; preset: enabled)
     Active: active (running) since Mon 2025-09-22 04:05:08 UTC; 20s ago
 Invocation: 8cfeb29631f443f0830bffeb00975931
       Docs: man:suricata(8)
             man:suricatasc(8)
             https://redmine.openinfosecfoundation.org/projects/suricata/wiki
   Main PID: 268 (Suricata-Main)
      Tasks: 7 (limit: 4915)
     Memory: 36.8M (peak: 37M)
        CPU: 2.222s
     CGroup: /system.slice/suricata.service
             `-268 /usr/bin/suricata -c /etc/suricata/suricata.yaml -i eth0
Sep 22 04:05:08 beaglebone-yocto systemd[1]: Started Suricata IDS/IDP daemon.
Sep 22 04:05:09 beaglebone-yocto suricata[268]: i: suricata: This is Suricata version 7.0.0 RELEASE running in SYSTEM mode
Sep 22 04:05:10 beaglebone-yocto suricata[268]: W: detect: No rule files match the pattern /var/lib/suricata/rules/suricata.rules
Sep 22 04:05:10 beaglebone-yocto suricata[268]: W: detect: 1 rule files specified, but no rules were loaded!
Sep 22 04:05:10 beaglebone-yocto suricata[268]: i: threads: Threads created -> W: 1 FM: 1 FR: 1   Engine started.
(cherry picked from commit 0b7b0629bebe98237ce3060ebe132db05cdcc3b7)
---
 recipes-ids/suricata/suricata_7.0.0.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-ids/suricata/suricata_7.0.0.bb +1 -0
index 021575f..62baa35 100644
@@ -156,6 +156,7 @@ fi
 }
 
 SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
 
 PACKAGES =+ "${PN}-python"
 FILES:${PN} += "${systemd_unitdir} ${sysconfdir}/tmpfiles.d"
Signature · 1 line
2.47.3
#34 lore raw

PATCH 32/32 suricata: update to 7.0.12

In reply to Scott Murray

From: Clayton Casciato <[email protected]>

Also update libhtp to required version 0.5.52.

See suricata release notes for more details about changes and CVEs fixed:

https://suricata.io/2024/02/08/suricata-7-0-3-and-6-0-16-released/
https://suricata.io/2024/03/19/suricata-7-0-4-and-6-0-17-released/
https://suricata.io/2024/04/23/suricata-7-0-5-and-6-0-19-released/
https://suricata.io/2024/06/27/suricata-7-0-6-and-6-0-20-released/
https://suricata.io/2024/10/01/suricata-7-0-7-released/
https://suricata.io/2024/12/12/suricata-7-0-8-released/
https://suricata.io/2025/03/18/suricata-7-0-9-released/
https://suricata.io/2025/07/08/suricata-7-0-11-released/
https://suricata.io/2025/09/16/suricata-8-0-1-and-7-0-12-released/

Obsolete CVE patches removed.

(cherry picked from commit fbb8343cf81b0cfe1dc396b0cd2417a8315de9ad)
---
 ...kefile-from-using-its-own-rust-steps.patch |   40 +
 .../suricata/files/CVE-2024-32663-001.patch   |  294 -
 .../suricata/files/CVE-2024-32663-002.patch   |   70 -
 .../suricata/files/CVE-2024-32664.patch       |   53 -
 .../suricata/files/CVE-2024-32867-001.patch   |  235 -
 .../suricata/files/CVE-2024-32867-002.patch   |  591 --
 .../suricata/files/CVE-2024-32867-003.patch   |  472 --
 .../suricata/files/CVE-2024-32867-004.patch   |  169 -
 .../suricata/files/CVE-2024-45795.patch       |  123 -
 .../suricata/files/CVE-2024-45796.patch       |   33 -
 .../suricata/files/CVE-2024-45797.patch       |  148 -
 .../suricata/files/CVE-2024-55605.patch       |  205 -
 .../suricata/files/CVE-2024-55627-001.patch   |   59 -
 .../suricata/files/CVE-2024-55627-002.patch   |   44 -
 .../suricata/files/CVE-2024-55627-003.patch   |   41 -
 .../suricata/files/CVE-2024-55628-001.patch   |  738 ---
 .../suricata/files/CVE-2024-55628-002.patch   | 4877 -----------------
 .../suricata/files/CVE-2024-55628-003.patch   |  114 -
 .../suricata/files/CVE-2024-55628-004.patch   |  510 --
 .../suricata/files/CVE-2025-29916-01.patch    |  124 -
 .../suricata/files/CVE-2025-29916-02.patch    |  197 -
 .../suricata/files/CVE-2025-29916-03.patch    |   55 -
 .../suricata/files/CVE-2025-29917.patch       |  115 -
 .../suricata/files/CVE-2025-29918.patch       |   49 -
 .../suricata/files/CVE-2025-53537-001.patch   |   79 -
 .../suricata/files/CVE-2025-53537-002.patch   |   31 -
 recipes-ids/suricata/files/fixup.patch        |   32 -
 .../{libhtp_0.5.45.bb => libhtp_0.5.52.bb}    |    8 +-
 recipes-ids/suricata/suricata-crates.inc      | 1509 +++--
 .../{suricata_7.0.0.bb => suricata_7.0.12.bb} |   26 +-
 30 files changed, 780 insertions(+), 10261 deletions(-)
 create mode 100644 recipes-ids/suricata/files/0001-Skip-pkg-Makefile-from-using-its-own-rust-steps.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32663-001.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32663-002.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32664.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32867-001.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32867-002.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32867-003.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-32867-004.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-45795.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-45796.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-45797.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55605.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55627-001.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55627-002.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55627-003.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55628-001.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55628-002.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55628-003.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2024-55628-004.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-29916-01.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-29916-02.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-29916-03.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-29917.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-29918.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-53537-001.patch
 delete mode 100644 recipes-ids/suricata/files/CVE-2025-53537-002.patch
 delete mode 100644 recipes-ids/suricata/files/fixup.patch
 rename recipes-ids/suricata/{libhtp_0.5.45.bb => libhtp_0.5.52.bb} (72%)
 rename recipes-ids/suricata/{suricata_7.0.0.bb => suricata_7.0.12.bb} (86%)
recipes-ids/suricata/files/0001-Skip-pkg-Makefile-from-using-its-own-rust-steps.patch new file +40 -0
new file mode 100644
index 0000000..12cb096
@@ -0,0 +1,40 @@
+From a59708a9300df8116867ac77f7829f7fd647325e Mon Sep 17 00:00:00 2001
+From: Clayton Casciato <[email protected]>
+Date: Mon, 3 Nov 2025 10:30:26 -0700
+Subject: [PATCH] Skip pkg Makefile from using its own rust steps
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Armin Kuster <[email protected]>
+Signed-off-by: Clayton Casciato <[email protected]>
+---
+ Makefile.am | 2 +-
+ Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d0d3d09..a572912 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -10,7 +10,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
+ 	     scripts/generate-images.sh \
+ 	     scripts/docs-almalinux9-minimal-build.sh \
+ 	     scripts/docs-ubuntu-debian-minimal-build.sh
+-SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \
++SUBDIRS = $(HTP_DIR) src qa rules doc contrib etc python ebpf \
+           $(SURICATA_UPDATE_DIR)
+ 
+ CLEANFILES = stamp-h[0-9]*
+diff --git a/Makefile.in b/Makefile.in
+index 7a89353..3864613 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -428,7 +428,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
+ 	     scripts/docs-almalinux9-minimal-build.sh \
+ 	     scripts/docs-ubuntu-debian-minimal-build.sh
+ 
+-SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \
++SUBDIRS = $(HTP_DIR) src qa rules doc contrib etc python ebpf \
+           $(SURICATA_UPDATE_DIR)
+ 
+ CLEANFILES = stamp-h[0-9]*
recipes-ids/suricata/files/CVE-2024-32663-001.patch deleted +0 -294

294 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32663-002.patch deleted +0 -70

70 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32664.patch deleted +0 -53

53 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-001.patch deleted +0 -235

235 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-002.patch deleted +0 -591

591 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-003.patch deleted +0 -472

472 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-32867-004.patch deleted +0 -169

169 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-45795.patch deleted +0 -123

123 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-45796.patch deleted +0 -33
deleted file mode 100644
index ae00a5f..0000000
@@ -1,33 +0,0 @@
-From 9203656496c4081260817cce018a0d8fd57869b5 Mon Sep 17 00:00:00 2001
-From: Philippe Antoine <[email protected]>
-Date: Mon, 15 Jul 2024 09:52:00 +0200
-Subject: [PATCH] defrag: fix off by one
-
-Ticket: 7067
-
-This off by one could lead to an empty fragment being inserted
-in the rb tree, which led to integer underflow.
-
-Upstream-Status: Backport [https://github.com/OISF/suricata/commit/9203656496c4081260817cce018a0d8fd57869b5]
-CVE: CVE-2024-45796
-Signed-off-by: Hitendra Prajapati <[email protected]>
----
- src/defrag.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/defrag.c b/src/defrag.c
-index 71cf420..38704c9 100644
---- a/src/defrag.c
-+++ b/src/defrag.c
-@@ -808,7 +808,7 @@ DefragInsertFrag(ThreadVars *tv, DecodeThreadVars *dtv, DefragTracker *tracker,
-         }
-     }
- 
--    if (ltrim > data_len) {
-+    if (ltrim >= data_len) {
-         /* Full packet has been trimmed due to the overlap policy. Overlap
-          * already set. */
-         goto done;
--- 
-2.25.1
-
recipes-ids/suricata/files/CVE-2024-45797.patch deleted +0 -148

148 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55605.patch deleted +0 -205

205 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55627-001.patch deleted +0 -59

59 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55627-002.patch deleted +0 -44

44 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55627-003.patch deleted +0 -41

41 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-001.patch deleted +0 -738

423 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-002.patch deleted +0 -4877

4,877 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-003.patch deleted +0 -114

114 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2024-55628-004.patch deleted +0 -510

510 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29916-01.patch deleted +0 -124

124 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29916-02.patch deleted +0 -197

197 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29916-03.patch deleted +0 -55

55 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29917.patch deleted +0 -115

115 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-29918.patch deleted +0 -49

49 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-53537-001.patch deleted +0 -79

79 lines not on this page · raw message

recipes-ids/suricata/files/CVE-2025-53537-002.patch deleted +0 -31
deleted file mode 100644
index ff4f1a0..0000000

Lines of this file are not shown. View the raw message.

recipes-ids/suricata/files/fixup.patch deleted +0 -32
deleted file mode 100644
index 0b2ae7c..0000000

Lines of this file are not shown. View the raw message.

recipes-ids/suricata/libhtp_0.5.52.bb renamed from recipes-ids/suricata/libhtp_0.5.45.bb +2 -6
similarity index 72%
rename from recipes-ids/suricata/libhtp_0.5.45.bb
rename to recipes-ids/suricata/libhtp_0.5.52.bb
index b87db35..d849e8f 100644

Lines of this file are not shown. View the raw message.

recipes-ids/suricata/suricata-crates.inc +736 -773

1,509 lines not on this page · raw message

recipes-ids/suricata/suricata_7.0.12.bb renamed from recipes-ids/suricata/suricata_7.0.0.bb +2 -24
similarity index 86%
rename from recipes-ids/suricata/suricata_7.0.0.bb
rename to recipes-ids/suricata/suricata_7.0.12.bb
index 62baa35..ff022e0 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.47.3

Part of the diff is not shown here. View the raw message.

#35 lore raw
In reply to Scott Murray
Quoted 6 lines

- There are still some other outstanding CVEs for firejail and clamav. firejail is potentially upgradeable, but clamav is problematic since I believe 0.104.x was already unsupported when scarthgap shipped. If you care about clamav support for scarthgap, plus provide some input on if an upgrade to one of the LTS branches (1.0 or 1.4) is something you would like to see / would be able to help test.

Hi, Scott

I would like to see clamav updated (1.4 preferred).

--
Clayton Casciato

#36 lore raw

Hi Clayton,

The ClamAV 1.4.3 recipe patch submitted for master is also tested on scarthgap. It can be ported to the scarthgap branch with minimal changes:
Required Changes for Scarthgap:
- add S = "${WORKDIR}/git"
- Replace all ${UNPACKDIR} with ${WORKDIR}

That's it! Everything else remains identical.

Thanks
Hemant