Commit Graph

1507 Commits

Author SHA1 Message Date
Hitendra Prajapati
8477af51d6 suricata: Fix CVE-2024-55605
Upstream-Status: Backport from f80ebd5a30 && c3a6abf601

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 22:56:53 +02:00
akash hadke
0b3cb32abd meta-security: Remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Signed-off-by: Akash Hadke <akash.hadke27@gmail.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 22:56:53 +02:00
Hitendra Prajapati
4f19c6b49a suricata: fix CVE-2024-45795 & CVE-2024-45796
* CVE-2024-45795 - Upstream-Status: Backport from 72456d359b && 96d5c81aed
* CVE-2024-45796 - Upstream-Status: Backport from 9203656496

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 22:56:53 +02:00
Armin Kuster
0562172076 harden-image-minimal: Fix usermod
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit c08a91e5e6)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 22:56:53 +02:00
Scott Murray
6be5c4ef33 ima-evm-utils: remove unnecessary FILESEXTRAPATHS tweak
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.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
(cherry picked from commit 5770a76fc0)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:41:06 +02:00
Scott Murray
bb6ea60778 meta-tpm: Small maintainers fix
To avoid confusion, remove stray aircrack-ng entry as it is actually
in the main layer and not meta-tpm.

(cherry picked from commit 9f1d763bb1)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:41:06 +02:00
Scott Murray
e72b57ca2d packagegroup-core-security: add missing packages
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 26e745243d)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:38:53 +02:00
Chen Qi
9025527f4c libgssglue: switch to use git source
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.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit baaafdf08b)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:08:13 +02:00
Marta Rybczynska
2617d4c9c9 bastille: prevent host uids on files
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.

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
(cherry picked from commit 7bdd0a8b48)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:08:13 +02:00
Marta Rybczynska
5f791761ff checksecurity: update the debian package
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 <gregoa@debian.org>  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 <holger@debian.org>  Fri, 01 Jan 2021 19:17:53 +0100

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
(adapted from 828a78314f)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 16:08:13 +02:00
Marta Rybczynska
e3c2d031bc chkrootkit: use debian mirror
Use the debian mirror as the ubuntu one is failing frequently.

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
2025-11-22 08:40:12 +02:00
Marta Rybczynska
010cbaf90e lynis: update 3.1.1 -> 3.1.4
Changelog at [1].

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

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
2025-11-22 08:40:12 +02:00
Marta Rybczynska
7425c3ca03 scap-security-guide: fix fetch
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

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
2025-11-22 08:40:12 +02:00
Marta Rybczynska
da3b5d09cd kas: update configuration
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

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
(squashed and recent master changes backported)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 08:40:12 +02:00
Marta Rybczynska
dbd0761fd6 CI: update build for new CI
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

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
(squashed and updated with missing master version changes)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2025-11-22 08:40:12 +02:00
Scott Murray
c8400db914 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)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-11-22 08:40:12 +02:00
Hitendra Prajapati
bc865c5276 libhtp: fix CVE-2024-45797
Upstream-Status: Backport from 0d550de551

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-11-04 08:17:37 -05:00
Vijay Anusuri
459d837338 tpm2-tss: upgrade 4.0.1 -> 4.0.2
Changelog:
https://github.com/tpm2-software/tpm2-tss/releases/tag/4.0.2

Includes Security fix:
CVE-2024-29040

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-09 19:43:57 -04:00
Hitendra Prajapati
e0bfd27ca0 clamav: fix CVE-2024-20505 & CVE-2024-20506
Backport fixes for:

* CVE-2024-20505 - Upstream-Status: Backport from 8915bd2257
* CVE-2024-20506 - Upstream-Status: Backport from 88efeda2a4

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-09 19:43:52 -04:00
Vijay Anusuri
2d5aaeb705 tpm2-tools: Upgrade 5.5 -> 5.7
Include Security fixes:
Fixed CVE-2024-29038
Fixed CVE-2024-29039

Changelog:
https://github.com/tpm2-software/tpm2-tools/releases/tag/5.7
https://github.com/tpm2-software/tpm2-tools/releases/tag/5.6

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-08-10 16:10:09 -04:00
Yi Zhao
11ea91192d ibmtpm2tss: upgrade 1661 -> 2.2.0
* Refresh patch
* Fix UPSTREAM_CHECK_GITTAGREGEX

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-04-22 08:00:01 -04:00
Wang Mingyu
93239b90ac lynis: upgrade 3.0.9 -> 3.1.1
0001-osdetection-add-OpenEmbedded-and-Poky.patch
removed since it's included in 3.1.1.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-04-22 07:51:05 -04:00
Yi Zhao
fb28801eee ibmswtpm2: upgrade 164-2020-192.1 -> 183-2024-03-27
Remove '-DALG_CAMELLIA=ALG_NO' from CFLAGS to fix compile error:
| TpmProfile_Common.h:109: error: "ALG_CAMELLIA" redefined [-Werror]
|   109 | #define ALG_CAMELLIA                ALG_YES
|       |

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-04-16 09:43:15 -04:00
Armin Kuster
d1522af21d README.md: update to new patches mailing list
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-04-09 11:31:35 -04:00
Mingli Yu
283a773f24 python3-pyinotify: Make asyncore support optional for Python 3
Simple fix for Python 3.12 since it dropped asyncore. Catches the import
error instead of using a version check so that the user can install the
compatibility package for any uses that can't be upgraded to asyncio or
similar immediately.

Fixes:
 # python3
 Python 3.12.1 (main, Dec 7 2023, 20:45:44) [GCC 13.2.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import pyinotify
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib64/python3.12/site-packages/pyinotify.py", line 71, in <module>
 import asyncore
 ModuleNotFoundError: No module named 'asyncore'
 >>>

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Max Krummenacher
2f89aa7e41 layer.conf: Update for the scarthgap release series
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Jeremy A. Puhlman
4ee2703298 arpwatch: install man8 dir
The install expects man8 directory to already exists. If not created
the man page gets installed as "man8", which causes conflicts with
other packages, that expect it to be a directory.

'arpsnmp' -> '/build/project/tmp/work/corei7-64-poky-linux/arpwatch/3.3/image/usr/sbin/arpsnmp'
'./arpwatch.8' -> '/build/project/tmp/work/corei7-64-poky-linux/arpwatch/3.3/image/usr/share/man/man8'
removed '/build/project/tmp/work/corei7-64-poky-linux/arpwatch/3.3/image/usr/share/man/man8'
'./arpsnmp.8' -> '/build/project/tmp/work/corei7-64-poky-linux/arpwatch/3.3/image/usr/share/man/man8'

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Jeremy A. Puhlman
f4ef325fc3 Check for usrmerge before removing /usr/lib
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Kevin Hao
40ddb9e5ed dm-verity-image-initramfs: Set IMAGE_NAME_SUFFIX to empty
According to the Yocto reference manual [1], the IMAGE_NAME_SUFFIX should
be set to empty for the initramfs image. Otherwise, we may incur a build
error like following due to the initrd check in live-vm-common.bbclass:
  ERROR: core-image-minimal-1.0-r0 do_bootimg: build-test/tmp/deploy/images/genericx86-64/dm-verity-image-initramfs-genericx86-64.cpio.gz is invalid. initrd image creation failed.
  ERROR: core-image-minimal-1.0-r0 do_bootimg: ExecutionError('build-test/tmp/work/genericx86_64-poky-linux/core-image-minimal/1.0/temp/run.build_hddimg.1961965', 1, None, None)
  ERROR: Logfile of failure stored in: build-test/tmp/work/genericx86_64-poky-linux/core-image-minimal/1.0/temp/log.do_bootimg.1961965
  ERROR: Task (poky/meta/recipes-core/images/core-image-minimal.bb:do_bootimg) failed with exit code '1'

[1] https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_NAME_SUFFIX

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Armin Kuster
60021acffb openscap: update to tip to fix new build issue.
drop patch now included.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Jeremy A. Puhlman
bb9321264a aprwatch: Add path for sendmail
Arpwatch won't build on a system without a sendmail provider
installed with out this setting.

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Jeremy A. Puhlman
0f4b8ec2a7 arpwatch: fix misspelling of PACKAGECONFIG
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Kevin Hao
d80cd2ba6a dm-verity: Set the IMAGE_FSTYPES correctly when dm-verity is enabled
After the using inherit_defer for the image classes in oe-core commit
451363438d38 ("classes/recipes: Switch to use inherit_defer"),
the using of anonymous python function in dm-verity-img.bbclass to
set the IMAGE_FSTYPES doesn't work anymore. The reason is that
image.bbclass also use anonymous python function to add the do_image_xxx
task for the corresponding filesystem type. The anonymous function in
dm-verity-img.bbclass is evaluated much later than the one in
image.bbclass. Then the task such as do_image_vhash will not be added
as we expect. So we choose to use "+=" to set the IMAGE_FSTYPES.

The populate_sdk_ext.bbclass may generate a dependency list like below:
  core-image-minimal.do_sdk_depends -> lib32-core-image-minimal.do_image_vhash

So we also need to make sure the do_image_vhash task for the multilib
filesystem is added.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Kevin Hao
7b951e3900 dm-verity: Adjust the image names according to the oe-core change
After the oe-core commit 26d97acc7137 ("image-artifact-names: include
${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and
${IMAGE_LINK_NAME}"), the image names have changed from
  core-image-minimal-qemux86-64-20230307181808.rootfs.ext4
  core-image-minimal-qemux86-64.ext4
to
  core-image-minimal-qemux86-64.rootfs-20230307181456.ext4
  core-image-minimal-qemux86-64.rootfs.ext4

Adjust the images name used by dm-verity according to this change.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Kevin Hao
f9f0aa774b docs: dm-verity.txt: Fix a typo
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-03-27 12:36:58 -04:00
Armin Kuster
4eab875b33 meta-security: Drop ${PYTHON_PN}
Signed-off-by: Armin Kuster <akuster808@gmail.com>

---
V2] Fix typo in python3-pyinotify changes
2024-03-27 12:36:58 -04:00
BELOUARGA Mohamed
30e755c592 lynis: Add missing runtime dependencies
Lynis tool needs ip, ss, tr and netstat.
If they are missing Lynis skips some important audit tests.

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-20 07:40:39 -05:00
BELOUARGA Mohamed
5d2bd6bbb5 checksec: Add more runtime dependencies to checksec tool
Checksec tool depends of commands "find, file and ps"

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-20 07:40:39 -05:00
Yi Zhao
6f7f2b6b47 openscap: fix build with python 3.12
Backport a patch to fix build with python 3.12:
$ bitbake openscap-native
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils'
CMake Error at swig/python3/CMakeLists.txt:35 (install):
  install TARGETS given no LIBRARY DESTINATION for module target
  "_openscap_py".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-20 07:40:39 -05:00
Leon Anavi
06979d5548 integrity-image-minimal: Fix IMAGE_INSTALL
Append to IMAGE_INSTALL rather than directly setting the variable
and does it after inheriting core-image.bbclass because in it
IMAGE_INSTALL is set with a default value CORE_IMAGE_BASE_INSTALL.

Variable CORE_IMAGE_BASE_INSTALL includes CORE_IMAGE_EXTRA_INSTALL
so the change allows adding auditd to CORE_IMAGE_EXTRA_INSTALL as
per the instructions in meta-integrity/README.md.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-20 07:40:39 -05:00
Leon Anavi
d444b7d7da linux-yocto%.bbappend: Add audit.cfg
Add audit.cfg configuration fragment. By default it is not appended
to SRC_URI. It allows enabling the audit kernel subsystem which may
help to debug appraisal issues. Boot with "integrity_audit=1" to
capture a more complete set of events in /var/log/audit/.

Previously the same configuration fragment was provided by layer
meta-security-framework but it is no longer maintained therefore it
makes sense to have audit.cfg in layer meta-integrity.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-20 07:40:39 -05:00
Armin Kuster
3791852532 scap-security-guide: update to 0.1.71
change branch name to stable.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-28 12:13:54 -05:00
Armin Kuster
d25b348394 python3-fail2ban: remove unused distutils dependency
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-28 12:13:54 -05:00
Armin Kuster
4982aa40b7 python3-pyinotify: do not rely on smtpd module
It's not mentioned anywhere in source code, and python 3.12
has removed it.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-28 12:13:54 -05:00
Yushi Sun
79b5f135a8 meta-security: libhoth: SRCREV bump e520f8f...e482716
Nicholas Nooney (1):
      Update error messages in htool_exec_hostcmd (#43)

Royce (1):
      Add ability to process raw host commands (#41)

Yoan Andreev (1):
      Payload getstatus (#40)

daimeng (1):
      htool: Allow console snapshot on proxy channels (#42)

Signed-off-by: Yushi Sun <yushis@google.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-28 12:13:54 -05:00
Mikko Rapeli
7fab92b3c0 parsec-tool: fix serialNumber check
New openssl 3.2.0 version removed spaces around serialNumber in:

Subject: CN=parallaxsecond.com, serialNumber=EZ4U2CIXL

Fixes parsec-service oeqa test on qemu.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-28 12:13:54 -05:00
Armin Kuster
b2e1511338 python3-pyinotify: fail2ban needs this module
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-12-29 09:09:30 -05:00
Mikko Rapeli
73e03651ef dm-verity-img.bbclass: add DM_VERITY_DEPLOY_DIR
If image recipe A wants to embed another image B which used
dm-verity-img.bbclass and generated the .wks file, then
recipe B must deploy everything to IMGDEPLOYDIR but recipe A
finds the output from DM_VERITY_DEPLOY_DIR = "${DEPLOY_DIR_IMAGE}".

Now both A and B images can use dm-verity-img.bbclass.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Reviewed-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-12-29 09:09:30 -05:00
Erik Schilling
fd295b2c28 dm-verity-img.bbclass: remove IMAGE_NAME_SUFFIX
It is embedded into IMAGE_NAME since poky master branch commit
6f6c79029bc2020907295858449c725952d560a1

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-12-29 09:09:30 -05:00
Erik Schilling
57723ce65e dm-verity-img.bbclass: use bc-native
Build host may not have bc.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-12-29 09:09:30 -05:00