Commit Graph

84 Commits

Author SHA1 Message Date
Michael Opdenacker 32081787dc kernel-hardening-checker: update 0.6.10.2 -> 0.6.17.1
Following the update on master.

This version reports more hardening issues:
128 "failures" instead of 113 on the same kernel.

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2026-04-29 10:14:29 +05:30
Jinfeng Wang f3e47be00a nmap: rename enum PCAP_SOCKET
The enum PCAP_SOCKET conflicts with the PCAP_SOCKET macro introduced in
libpcap 1.10.5. Use ifdefs to handle both old and new libpcap versions,
renaming the enum to NM_PCAP_SOCKET when the PCAP_SOCKET macro is defined.

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2026-04-15 14:12:18 +05:30
Armin Kuster ff87862031 audit: fix build when systemd is enabled.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit e68145b002)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2025-11-17 10:15:06 +05:30
Shinji Matsunaga 80adc2113c audit: Fix CVE_PRODUCT
Fix "audit" set in CVE_PRODUCT to "linux:audit" to detect only vulnerabilities where the vendor is "linux".

Currently, CVE_PRODUCT also detects vulnerabilities where the vendor is "visionsoft",
which are unrelated to the "audit" in this recipe.
https://www.opencve.io/cve?vendor=visionsoft&product=audit

In addition, all the vulnerabilities currently detected in "audit" have the vendor of "visionsoft" or "linux".
Therefore, fix "audit" set in CVE_PRODUCT to "linux:audit".

Signed-off-by: Shinji Matsunaga <shin.matsunaga@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit e87e51da49)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2025-11-17 10:15:06 +05:30
Yi Zhao 4fc68d0837 audit: upgrade 4.0.1 -> 4.0.2
ChangeLog:
 - Fix musl C builds
 - Many code cleanups
 - Use atomic variables if available for signal related flags
 - Dont rotate audit logs when auditd is in debug mode
 - Fix a couple memory leaks on error paths
 - Correct output when displaying rules with exe/path/dir
 - Fix auparse lookup test to not use the system libaupaurse
 - Improve auparse metrics
 - Update auparse normalizer for recent syscalls
 - Make status report uniform

Drop 0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch as
the issue has been fixed upstream.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit f7e691ff43)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2025-11-17 10:15:06 +05:30
Michael Opdenacker 2222925e92 kernel-hardening-checker: backport recipe
This recipe is a Scarthgap backport of kernel-hardening-checker_0.6.10.2.bb
in the master branch as of August 19, 2025.

Tested on qemux86-64 and on beaglebone-yocto

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2025-09-12 08:15:13 +08:00
Guocai He ec1f3712f2 softhsm: correct the SRC_URI
The old SRC_URI is not available.

Signed-off-by: Guocai He <guocai.he.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-08-02 13:13:21 -04:00
alperak 050286a953 Use PYTHON_SITEPACKAGES_DIR instead of hard-coded site-packages directory path
The following paths have been replaced with PYTHON_SITEPACKAGES_DIR:

- "${libdir}/${PYTHON_DIR}/site-packages"
- "${libdir}/python${PYTHON_BASEVERSION}/site-packages"
- "${libdir}/python*/site-packages"
- "${libdir}/python3.*/site-packages"

Signed-off-by: alperak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-04-21 10:52:39 -07:00
Yi Zhao 831041c60a audit: upgrade 4.0 -> 4.0.1
ChangeLog:
https://github.com/linux-audit/audit-userspace/releases/tag/v4.0.1

Update TRUSTED_APP interpretation to look for known fields;
In auditd plugins, allow variable amount of arguments;
Fix augenrules to work correctly when kernel is in immutable mode;
Add audisp-filter plugin;
Improve sorting speed of aureport --summary reports;
Auditd & audit-rules.service pick up paths automatically.

* Drop backport patch.
* Specify runstatedir.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-22 09:05:47 -07:00
Khem Raj 14e3fc2648 keyutils: Add missing rdep for ptests
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-01 16:37:55 -08:00
Yi Zhao 15b0630583 audit: upgrade 3.1.2 -> 4.0
ChangeLog:
https://github.com/linux-audit/audit-userspace/releases/tag/v4.0
Major changes:
  Separate loading rules and logging events into separate services,
  audit-rules.service and auditd.service.
  Drop support for python2 and SysVinit.
  The auvirt and autrace programs have been dropped.
  The syscall and interpretation tables have been updated for the 6.8
  kernel.

* Backport patch to fix build error with musl
* Clean up configure options
* Use its own systemd service files
* Refresh patches
* Fix indentation

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-02-26 08:13:20 -08:00
Gassner, Tobias.ext 9cb6fc0a54 softhsm_2.6.1.bb fixing p11-kit module path, adding softhsm2.module to FILES
[Edited Message Follows]
[Reason: include softhsm2.module only in FILES if pk11 is set in PACKAGECONFIG]

From 216dba6552f2b3a65c3fc9b586736d93132a0166 Mon Sep 17 00:00:00 2001
From: "Gassner, Tobias.ext" <tobias.gassner.ext@karlstorz.com>
Date: Thu, 18 Jan 2024 12:50:22 +0100
Subject: [PATCH] softhsm_2.6.1.bb fixing p11-kit module path, adding
 softhsm2.module to FILES

In order for the softhsm module to be discoverable by p11-kit proxy the
softhsm2.module file must be deployed to ${datadir}/p11-kit/modules.
This was previously not the case. Also the p11-kit module path
(--with-p11-kit) seemed to point to the wrong directory and had a syntax
error (two == instead one =).

Signed-off-by: Gassner, Tobias.ext <tobias.gassner.ext@karlstorz.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-20 22:15:02 -08:00
Alexander Kanavin cb6cd5a566 audit: reenable python bindings and bring in distutils via setuptools (needed with python 3.12)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-01 17:09:56 -08:00
Alexander Kanavin 51e070301e nmap: disable ndiff
In 7.80 this requires distutils (no longer provided in python 3.12).
This may be resolved in newer nmap versions, so if you care about it
please provide a version update: https://nmap.org/dist/

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-31 08:27:49 -08:00
Alexander Kanavin 369659d17e audit: disable python bindings as incompatible with python 3.12
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-31 08:27:47 -08:00
Wang Mingyu 8fd762ae34 tomoyo-tools: upgrade 2.5.0 -> 2.6.1
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-11-28 08:55:40 -08:00
Khem Raj 8744c20fc0 usbguard: Enable seccomp if distro features have it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-10 06:49:11 -07:00
Yi Zhao 8196c8bf4a audit: upgrade 3.1.1 -> 3.1.2
Changelog:
https://github.com/linux-audit/audit-userspace/releases/tag/v3.1.2

Refresh local patches.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-10 06:49:11 -07:00
Wang Mingyu 8257d87d2d passwdqc: upgrade 2.0.2 -> 2.0.3
makefile-add-ldflags.patch
refreshed for 2.0.3

Changelog:
===========
-Added pkg-config file.
-Changed enforce=users to support "chpasswd" PAM service in addition to
traditionally supported "passwd".

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-07-07 08:59:27 -07:00
Martin Jansa be8c765c7c *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:

5 (26%) 	meta-xfce
6 (50%) 	meta-perl
15 (42%)        meta-webserver
21 (36%)        meta-gnome
25 (57%)        meta-filesystems
26 (43%)        meta-initramfs
45 (45%)        meta-python
47 (55%)        meta-multimedia
312 (63%)       meta-networking
756 (61%)       meta-oe

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-21 09:15:20 -07:00
Bartosz Golaszewski e20ebe6ce4 python3-nmap: add missing run-time dependencies
Add missing RDEPENDS for this package.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-06 23:07:59 -07:00
Wang Mingyu ea055e9b78 audit: upgrade 3.1 -> 3.1.1
Changelog:
=========
- Add user friendly keywords for signals to auditctl
- In ausearch, parse up URINGOP and DM_CTRL records
- Harden auparse to better handle corrupt logs
- Fix a CFLAGS propogation problem in the common directory
- Move the audispd af_unix plugin to a standalone program

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-05-08 21:37:55 -07:00
Yi Zhao 56db1cfb71 audit: drop version 2.8.5
Removed version 2.8.5, as the 2.8 series is no longer maintained since
2020.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-05 14:34:38 -08:00
Yi Zhao 836c503259 audit: upgrade 3.0.9 -> 3.1
ChangeLog:
https://github.com/linux-audit/audit-userspace/releases/tag/v3.1
Major features:
  Add new record types
  Add io_uring support
  Add support for new FANOTIFY record fields

* Remove redundant python3native as it is already inherited by
  python3targetconfig
* Fix indentation

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-05 14:34:38 -08:00
Wang Mingyu f64d67df49 bubblewrap: upgrade 0.7.0 -> 0.8.0
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-04 10:41:27 -08:00
Jan Luebbe 630e29d316 softhsm: enable objectstore backend
We already depend on sqlite, but the objectstore backend using it is not
enabled by default. Add the necessary configure option.

The db backend is more robust when accessing the objectstore from many
parallel processes (such as during kernel module signing).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-01 09:11:49 -08:00
Jan Luebbe d3a5cfe748 softhsm: avoid unnecessary check for native sqlite binary
SoftHSMv2 actually only uses the sqlite library. With the check for the
sqlite3 binary, building with the DB backend would mean depending on
sqlite-native.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-01 09:11:49 -08:00
Martin Jansa 674414be24 keyutils: fix Upstream-Status formatting
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-27 17:06:52 -08:00
Khem Raj 87bf350726 usbguard: Fix build with gcc13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-27 17:06:52 -08:00
Alex Kiernan 438a5dd5e0 keyutils: Upgrade 1.6.1 -> 1.6.3
Move SRC_URI to git as there's no tarball for 1.6.3. Fix failing tests
when busybox is providing `head`. Pull in reproducibility fix from Arch
Linux. Remove autoconf inherit as this is a simple Makefile package. Add
manpages support via inherit so man-db is updated. Add missing ptest
dependencies.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-26 10:24:25 -08:00
Alex Kiernan ee624a6a7f usbguard: Upgrade 1.1.1 -> 1.1.2
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-06 11:38:16 -08:00
Alex Kiernan f91cf84bda usbguard: Remove pegtl from DEPENDS
Using `DEPENDS = "pegtl"` with `--with-bundled-pegtl` doesn't make
sense, so drop the DEPENDS.

Also add github-releases checking for newer versions.

Drop redundant setting of `S` to the default.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-06 11:38:16 -08:00
Markus Volk a71c6b16b6 bubblewrap: import recipe from meta-security
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-23 08:52:22 -08:00
Changqing Li 6de9b46cc7 keyutils: fix ptest failed since "+++ Can't Determine Endianness"
All the ptest cases are failed since error "+++ Can't Determine Endianness",
update the regex for matching the endianness to fix this issue.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-05 09:16:24 -08:00
Khem Raj c7fcebd05d audit: Inherit python3targetconfig
It uses python3-config during build to grok the python specific
includedirs, therefore its important to ensure that target specific
python3-config is used, otherwise currently it defaults to native
python3-config which ends up adding native python3 include paths
which might work out ok but is exposed when target is 32bit + lfs
enabled, the headers don't match between native and target python

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-11-30 09:46:47 -08:00
Wang Mingyu 01eb5561da audit: upgrade 3.0.8 -> 3.0.9
Changelog:
===========
    In auditd, release the async flush lock on stop
    Don't allow auditd to log directly into /var/log when log_group is non-zero
    Cleanup krb5 memory leaks on error paths
    Update auditd.cron to use auditctl --signal
    In auparse, if too many fields, realloc array bigger (Paul Wolneykien)
    In auparse, special case kernel module name interpretation
    If overflow_action is ignore, don't treat as an error

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-11-28 11:32:26 -08:00
Akash Hadke 51a12d6e8e audit: Fix compile error for audit_2.8.5
Fix below compile errors
1. Fix build with linux 5.17+
audit errors out due to swig munging it does with kernel headers

    | audit_wrap.c: In function '_wrap_audit_rule_data_buf_set':
    | audit_wrap.c:4701:17: error: cast specifies array type
    |  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
    |       |                 ^
    | audit_wrap.c:4701:15: error: invalid use of flexible array member
    |  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
    |       |               ^
    | audit_wrap.c:4703:15: error: invalid use of flexible array member
    |  4703 |     arg1->buf = 0;
    |       |               ^

These errors are due to VLAIS from kernel headers, so we copy
linux/audit.h and make the needed change in local audit.h and make
needed arrangements in build to use it when building audit package

Take reference of upstream commit
ee3c680c3 audit: Upgrade to 3.0.8 and fix build with linux 5.17+

Update 0002-Fixed-swig-host-contamination-issue.patch

2. Fix ipx.h missing file bug for kernel 5.15
ipx.h header file is removed in kernel 5.15
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/net?id=6c9b40844751ea30c72f7a2f92f4d704bc6b2927

which is causing below error for system with kernel equal and
higher than 5.15

| ../../git/auparse/interpret.c:48:10: fatal error: linux/ipx.h: No such file or directory
|    48 | #include <linux/ipx.h>
|       |          ^~~~~~~~~~~~~

Add below patch to fix this issue.
0001-Make-IPX-packet-interpretation-dependent-on-the-ipx-header.patch
Link: https://github.com/linux-audit/audit-userspace/commit/6b09724c69d91668418ddb3af00da6db6755208c

Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
Signed-off-by: Akash Hadke <hadkeakash4@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-10-21 09:57:59 -07:00
Chen Qi 5b0583d4e9 passwdqc: fix the libpasswdqc FILES setting
The actual file name is now libpasswdqc.so.1 instead of libpasswdqc.so.0.
This fixes the following error when installing passwdqc:

  nothing provides libpasswdqc needed by passwdqc-2.0.2-r0

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-20 18:55:26 -07:00
Khem Raj 747adab514 passwdqc: Upgrade to 2.0.2
License-Update: install-dependencies.sh and run-build-and-tests.sh are
mentioned under GPL-2.0 but they are not included in release tarball

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-07 16:44:54 -07:00
Khem Raj 4ff83dfb5a audit: Revert the tweak done in configure step in do_install
This tweak is needed for building audit but not the interfaces it may
expose via the headers, therefore undo the tweak before packaging things
up

Reported-By: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-17 11:05:56 -07:00
Khem Raj ad978133a1 audit: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-10 08:48:30 -07:00
Khem Raj ee3c680c30 audit: Upgrade to 3.0.8 and fix build with linux 5.17+
audit errors out due to swig munging it does with kernel headers

| audit_wrap.c: In function '_wrap_audit_rule_data_buf_set':
| audit_wrap.c:4701:17: error: cast specifies array type
|  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
|       |                 ^
| audit_wrap.c:4701:15: error: invalid use of flexible array member
|  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
|       |               ^
| audit_wrap.c:4703:15: error: invalid use of flexible array member
|  4703 |     arg1->buf = 0;
|       |               ^

These errors are due to VLAIS from kernel headers, so we copy
linux/audit.h and make the needed change in local audit.h and make
needed arrangements in build to use it when building audit package

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-08-08 11:38:15 -07:00
Khem Raj 984bc7eaca tomoyo-tools: Drop md5sum
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-25 10:44:13 -07:00
Khem Raj 8c7ffffa07 tomoyo-tools: Define SBINDIR
default SBINDIR is hardcoded to /sbin which does not work when using
usrmerge

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-25 10:44:13 -07:00
Alex Kiernan c2bb39f439 audit: Upgrade 3.0.6 -> 3.0.7
Dependency on bash has been removed upstream.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alex Kiernan <alexk@zuma.ai>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-18 10:13:16 -07:00
Anu Deepthika, Nandipati 144a7fff1e usbguard: package simplification
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-29 08:28:38 -07:00
Anu Deepthika, Nandipati f6a753022f usbguard: Add inital recipe
Set one crypto-backend library at a time
OpenSSL is the crypto-backend library set for device hashing
Override PACKAGECONFIG to replace it with libsodium or libgcrypt

Signed-off-by: Anu Deepthika, Nandipati <Nandipati.AnuDeepthika@philips.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-24 09:45:25 -07:00
Khem Raj 14c7d8a0d7 recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Richard Purdie b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
Yi Zhao f49108971e audit: upgrade 3.0.5 -> 3.0.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-19 09:23:08 -07:00