Commit Graph

1157 Commits

Author SHA1 Message Date
Marta Rybczynska cbbb804f5d 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

Signed-off-by: Marta Rybczynska <marta.rybczynska@ygreky.com>
(reworked for kirkstone branch)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2026-01-15 18:46:10 +02:00
Scott Murray eca72301e0 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>
2026-01-14 23:32:43 +02:00
Rohini Sangam b9cf9cd639 clamav: Security fix for CVE-2024-20505 and CVE-2024-20506
CVES fixed:
- CVE-2024-20505 clamav: out-of-bounds read bug in the PDF file parser
- CVE-2024-20506 clamav: ClamD process writes to log file while privileged without checking if its been replaced with a symlink
Upstream-Status: Backport from https://github.com/Cisco-Talos/clamav/commit/8915bd22570ee608907f1b88a68e587d17813812, https://github.com/Cisco-Talos/clamav/commit/88efeda2a4cb93a69cf0994c02a8987f06fa204d

Signed-off-by: Rohini Sangam <rsangam@mvista.com>
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-15 10:58:59 -04:00
Vijay Anusuri c50ef2937a tpm2-tss: upgrade 3.2.2 -> 3.2.3
Changelog:
https://github.com/tpm2-software/tpm2-tss/releases/tag/3.2.3

Includes Security fix:
CVE-2024-29040

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-15 10:58:35 -04:00
Vijay Anusuri bf1313a48a tpm2-tools: Upgrade 5.2 -> 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
https://github.com/tpm2-software/tpm2-tools/releases/tag/5.5
https://github.com/tpm2-software/tpm2-tools/releases/tag/5.4
https://github.com/tpm2-software/tpm2-tools/releases/tag/5.3

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-15 10:58:09 -04:00
Soumya Sambu 353078bc06 sssd: Fix CVE-2023-3758
A race condition flaw was found in sssd where the GPO policy is
not consistently applied for authenticated users. This may lead
to improper authorization issues, granting or denying access to
resources inappropriately.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-3758

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-05-05 08:37:19 -04:00
Armin Kuster 1a3e42cedb smack-test: more py3 covertion
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-04 17:26:33 -07:00
Armin Kuster f99844d793 smack-test: switch to python3
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-04 17:26:29 -07:00
Peter Marko 06c240c3c2 tpm2-tss: ignore CVE-2023-22745
As already mentioned in upgrade commit, this CVE is fixed.
But cve_check still reports it as NVD DB was not updated.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-07-30 09:09:22 -04:00
Maciej Borzęcki d398cc6ea6 dm-verity-img.bbclass: add squashfs images
Add squashfs to images supported by verity.

Signed-off-by: Maciek Borzecki <maciek@thing.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit ab8651c139)
Signed-off-by: Maciek Borzecki <maciek@thing.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-06-08 13:26:03 -04:00
Josh Harley d13f680eb8 Add EROFS support to dm-verity-img class
[PATCH] Add support for the EROFS image, and it's compressed options,
 to the dm-verity-img.bbclass setup, theoretically this is a simple addition
 to the list of types however there is a quirk in how Poky handles the
 filesystems in poky/meta/classes/image_types.bbclass.

Specifically the 'IMAGE_CMD' and 'IMAGE_FSTYPES' use a hyphen, e.g.
erofs-lz4, however in the image_type bbclass the task for that would be
"do_image_erofs_lz4", replacing the hyphen with an underscore.

As the dm-verity-img.bbclass adds a dependency to the wic image creation
on the do_image_* task then it fails as there is no
"do_image_erofs-lz4", so simply replace the hypen with an underscore.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 8ca6bb86e6)
Signed-off-by: Maciek Borzecki <maciek@thing.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-06-08 13:26:03 -04:00
Armin Kuster ef7d781f97 apparmor: fix ownership issues
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Maciej Borzecki <maciek@thing.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-06-08 13:26:03 -04:00
Peter Marko d164d7c06a tpm2-tss: upgrade to 3.2.2 to fix CVE-2023-22745
Changelog:
  3.2.2
    A buffer overflow in tss2-rc as CVE-2023-22745.
    The drv layer in tss2-rc should have been the policy layer.
    Spec deviation in Fapi_GetDescription caused description to be NULL when it should be empty string.
    This is API breaking but considered a bug since it deviated from the FAPI spec.
    FAPI: undefined reference to curl_url_strerror when using curl less than 7.80.0.
  3.2.1
    Makefile.am: make all EXTRA_DIST includes unconditional to fix pristine tars
    Fix usage of NULL pointer if Esys_TR_SetAuth is calles with ESYS_TR_NONE.
    Store VERSION into the release tarball.
    fapi: fix usage of policy_nv with a TPM nv index.
    Tss2_Sys_Flushcontext: flushHandle was encoded as a handleArea handle and not as parameter one, this affected the contents of cpHash.
    linking tcti for libtpms against tss2-tctildr. It should be linked against tss2-mu.
    build: Remove erroneous trailing comma in linker option. Bug #2391.
    esys: fix allow usage of HMAC sessions for Esys_TR_FromTPMPublic.
    test: build with opaque FILE structure like in musl libc.
    Usage of a second profile in a path was not possible because the default profile was always used.
    FAPI: Fix provisioning if auth value for storage hierarchy was set.
    FAPI: Fix recreation of EK.
    FAPI: Fix usage of lockout auth value in Fapi_Provison.
    FAPI: Fix loading of key in policy execution.
    FAPI: Fix Fapi_ChangeAuth updates on hierarchy objects not being reflected across profiles.
    Esys_PCR_SetAuthValue: remembers the auth like other SetAutg ESAPI functions.
    tests: esys-pcr-auth-value.int moved to destructive tests.
    FAPI: Fix double free if keystore is corrupted.
    Spec deviation in Fapi_GetDescription caused description to be NULL when it should be empty string.
        This is API breaking but considered a bug since it deviated from the FAPI spec.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-06-08 13:26:03 -04:00
Armin Kuster cc20e2af2a oeqa: meta-tpm shut swtpm down before and after testing
fixes:
swtpm: Could not open TCP socket: Address already in use

Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit b5642c519b)
[Fixup for kirkstone context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-02-22 15:31:09 -05:00
Armin Kuster a30a85dba1 oeqa/tpm2: fix and cleanup tests
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 3db9e08300)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-02-22 15:29:22 -05:00
Jose Quaresma c79262a30b meta-integrity: kernel-modsign: prevents splitting out debug symbols
Starting with [1] kernel modules symbols is being slipped in OE-core
and this breaks the kernel modules sign, so disable it.

[1] https://git.openembedded.org/openembedded-core/commit/?id=e09a8fa931fe617afc05bd5e00dca5dd3fe386e8

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit c1c80cf0c0)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-07-21 16:50:32 -07:00
Jeremy A. Puhlman e54e064b9a clamav: make install owner match the added user name
USERADD_PARAM:${PN}-freshclam = "--system -g ${CLAMAV_GID} --home-dir  \
    ${localstatedir}/lib/${BPN} \
        --no-create-home  --shell /sbin/nologin ${PN}"

The username added to the passwd file is ${PN}. When ${PN} is
multilibized, it no longer matches CLAMAV_UID. Make the two match.

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
2022-07-21 16:47:48 -07:00
Jeremy A. Puhlman c29ef97c84 python3-privacyidea: add correct path to lib/privacyidea
Nothing in getting installed in ${datadir}/lib, it is all going to
${prefix}/lib. setuptools pulls in ${libdir}/* so for the base lib
case of ${prefix}/lib the build works. If libdir is something else
lib64 for example, its still ending up in ${prefix}/lib and it fails
to build.

Set value to correct path as it is being installed.

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
2022-07-21 16:47:30 -07:00
Jeremy A. Puhlman ab90048862 libmhash: add multilib header
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
2022-07-21 16:47:24 -07:00
Davide Gardenal 7e3596e848 sssd: ignore CVE-2018-16838
CVE-2018-16838 is patched in our version of sssd but it doesn't have
a vulnerable version range in the NVD database,
that's why it needs to be ignored.

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
2022-07-21 16:46:46 -07:00
Jeremy A. Puhlman d3d8e62bf1 lib-perl: prefix man pages to avoid conflicting with base perl
The following occurs when pkgs-docs added to image features.

Error: Transaction test error:
  file /usr/share/man/man3/lib.3 conflicts between attempted installs of lib-perl-doc-0.63-r0.corei7_64 and perl-doc-5.34.1-r0.corei7_64

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit e05ce8fb39)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:47 -07:00
Anton Antonov b874791a97 Parsec-service: Update installation procedure
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 17d7ad92ea)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:47 -07:00
Armin Kuster 0325071a1d oeqa/cases/tpm2: fix and enhance test suite
local.conf
TEST_SUITES = "ssh ping tpm2"
IMAGE_INSTALL:append = " swtpm tpm2-pkcs11"

RESULTS:
RESULTS - ping.PingTest.test_ping: PASSED (0.05s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (2.19s)
RESULTS - tpm2.Tpm2Test.test_tpm2_pcrread: PASSED (1.06s)
RESULTS - tpm2.Tpm2Test.test_tpm2_pkcs11: PASSED (1.17s)
RESULTS - tpm2.Tpm2Test.test_tpm2_swtpm_reset: PASSED (0.59s)
RESULTS - tpm2.Tpm2Test.test_tpm2_swtpm_socket: PASSED (307.72s)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 8be830dd85)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:47 -07:00
Armin Kuster 4270d36b75 tpm2-tools: Add missing rdepends
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 311b7daea1)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:47 -07:00
Armin Kuster 2f91f348a3 tpm2-pkcs11: tpm2-pkcs11 module missing
Correctly fix symlink issue by putting module in -dev pkg.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 3045de13ab)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:26 -07:00
Armin Kuster ed75b8866f aide: Update 01.17.4
Precalculate buffer size in base64 functions (CVE-2021-45417)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 5a5edebbb8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:10 -07:00
Jeremy A. Puhlman 8727b7c76a aide: Add depend on audit when audit is enabled.
| checking for libaudit.h... no
| configure: error: You don't have libaudit properly installed. Install it if you need it.
| NOTE: The following config.log files may provide further information.

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit a8fba7a8ef)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:56:02 -07:00
Armin Kuster 9301e39d19 fscrypt: add distro_check on pam
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 20c13f6335)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-05-23 07:54:29 -07:00
Joe Slater 93f2146211 LICENSE: update to SPDX standard names
Use convert-spdx-licenses.py to update LICENSE in recipes.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Ranjitsinh Rathod 4158c871a6 samhain.inc: Correct LICENSE to GPL-2.0-only
It seems below change done manually and so LICENSE variable modified
from GPLv2 to GPL-2.0-or-later. But it should be GPL-2.0-only
Link: https://git.yoctoproject.org/meta-security/commit/?id=c56ae450c93a1383a1ce800a32a6ef2c3fbbae1c

Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard d4fffc44f3 tpm2-pkcs11: update to 1.8.0
The build patches are now included in the upstream,
the local binary checkes can be disabled with --disable-ptool-checks,
the boostrap doesn't need to be called if the release .tar.gz is used.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard f576e38379 tpm2-tss-engine: fix version string and build with openssl 3.0
Calling autoreconf outside git repo causes the version number to
be null. This patch makes the version number fixed.

Since Yocto now uses OpenSSL 3.0, the file packaging need to
be updated.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard da8cbb3b16 tpm2-abrmd: update to 2.4.1
The version number is correctly assigned only when the release .tar.gz
is used.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard 5855990d6f tpm2-tss: update to 3.2.0
This deletes the patches that were unused for a long time,
updates the tpm2-tss package and introduces a fix to the version
number problem that got introduced with the 3.2.0 version.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard f203d64c1f tpm2-openssl: update to 1.1.0
Also, the recipe is fixed to correctly package the openssl provider.

This new tpm2-openssl:
- Fixed segmentation fault when a signature algorithm is beging initialized
  without a private key.
- Fixed RSA/EC key equality checks. Works with OpenSSL 3.0.1.
- Added support for the `TPM2OPENSSL_PARENT_AUTH` environment variable.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Petr Gotthard c010297b49 tpm2-tools: fix missing version number
Calling autoreconf outside git repo causes the version number to
be null. This patch makes the version number fixed.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Anton Antonov 71fd7eda04 Upgrade parsec-service to 1.0.0 and parsec-tool to 0.5.2
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-13 13:45:44 -07:00
Davide Gardenal 498ca39cd6 fscrypt: update dependecy from go-dep-native to go-native
Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-07 10:26:45 -07:00
Davide Gardenal e92fad507a clamav: add COMPATIBLE_HOST to fix build error
Add COMPATIBLE_HOST to match what is found in glibc
to avoid build error when using musl

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-07 10:26:45 -07:00
Armin Kuster 48d6ff13e3 samhain: update to 4.4.7
This fixes musl builds too.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-07 10:26:45 -07:00
Armin Kuster cfb79c913f linux-yocto_security.inc: add lkrg kfrags
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-07 10:26:45 -07:00
Armin Kuster fb67042242 lkrg-module: covert to git fetcher
This allows to track tip easier.
refresh patch
Fix LICENSE to match SPDX format

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-07 10:26:45 -07:00
Armin Kuster 2be1d069ec python3-fail2ban: fix compile issue on some hosts
Use python3-native to use 2to3

Fix build issue on some hosts with this error:
 (result, consumed) = self._buffer_decode(data, self.errors, final)
 | UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd8 in position 152: invalid continuation byte

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-02 11:21:42 -07:00
Robert Yang 0c41d792cf LICENSE: adopt SPDX standard names
Modify LICENSE for ding-libs and libmhash.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-02 11:21:42 -07:00
Ashish Sharma c56ae450c9 meta-security : Use SPDX style licensing format
WARNING: selinux-sandbox-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: selinux-gui-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: semodule-utils-3.3-r0.1 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: selinux-dbus-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: libwhisker2-perl-2.5-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPL-1.0+ [obsolete-license] \
WARNING: lib-perl-0.63-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPL-1.0+ [obsolete-license] \
WARNING: libhtp-0.5.39-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
...

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-02 11:21:42 -07:00
Armin Kuster 943f48419a openscap-daemon: use renamaed python_setuptools_build_meta
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-02 11:21:34 -07:00
Armin Kuster da93339112 kas-security-alt: drop rust layer
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-13 08:11:29 -07:00
Armin Kuster 288391edc5 python3-privacyidea: drop old package ref.
meta-python dropped package via commit:

620689d4efba28bc8dd60e2d82908bfb3531fbd0
python3-backports-functional-lru-cache: remove, not needed for Python 3

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-13 08:11:21 -07:00
Ashish Sharma e5e3dd4877 Subject: [PATCH] Subject: python3-fail2ban: switch to legacy setuptools3
raise InvalidWheelFilename(f"{filename} is not a valid wheel filename.")
pip._internal.exceptions.InvalidWheelFilename: fail2ban-*-*.whl is not a valid wheel filename.
Removed build tracker: '/tmp/pip-req-tracker-qnepnk46'

ERROR: Failed to pip install wheel. Check the logs.

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-11 21:13:15 -08:00
Armin Kuster 30f34fa990 python3-fail2ban: fix SPDX license.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-11 21:12:56 -08:00