aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-03-23sssd: CVE-2022-4254 libsss_certmap fails to sanitise certificate data used ↵dunfellHitendra Prajapati
in LDAP filters Upstream-Status: Backport from https://github.com/SSSD/sssd/commit/1c40208aa1e0f9a17cc4f336c99bcaa6977592d3 & https://github.com/SSSD/sssd/commit/a2b9a84460429181f2a4fa7e2bb5ab49fd561274 Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-17chkrootkit: update SRC_URIArmin Kuster
0.53 no longer hosted from main source. Use Ubuntu archive Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-04-16clamav: drop creating cvd packageArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-27clamav: disable DB creation.Armin Kuster
The DB is no longer available, so disable it. remove from pkg group Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-20tpm2-tools: update to 4.1.3Ralph Siemsen
Minor version bump from 4.1.1 to 4.1.3, containing two fixes: 4.1.3 - 2020-06-02 * tpm2_create: Fix issue with userauth attribute being cleared if policy is specified. 4.1.2 - 2020-05-18 * Fix missing handle maps for ESY3 handle breaks. See #1994. https://github.com/tpm2-software/tpm2-tools/pull/1994 Details of changes https://github.com/tpm2-software/tpm2-tools/commits/4.1.X Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2022-03-20tpm2-tools: backport fix for CVE-2021-3565Ralph Siemsen
tpm2_import used a fixed AES key for the inner wrapper, which means that a MITM attack would be able to unwrap the imported key. Even the use of an encrypted session will not prevent this. The TPM only encrypts the first parameter which is the fixed symmetric key. To fix this, ensure the key size is 16 bytes or bigger and use OpenSSL to generate a secure random AES key. Upstream commit (with offset adjusted) https://github.com/tpm2-software/tpm2-tools/commit/c069e4f179d5e6653a84fb236816c375dca82515 Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-11-18sssd: re-package to fix QA issuesJeremy A. Puhlman
It packages all file in ${libdir} to package sssd, including the .so symlink files. Then it causes QA issues: | ERROR: QA Issue: sssd rdepends on dbus-dev [dev-deps] | ERROR: QA Issue: sssd rdepends on ding-libs-dev [dev-deps] So re-package sssd then the .so symlink files and .pc files are packaged to sssd-dev which should be. File ${libdir}/libsss_sudo.so is not a symlink file but packaged to sssd-dev too. Then causes another QA issue: | ERROR: sssd-2.5.2-r0 do_package_qa: QA Issue: -dev package sssd-dev contains non-symlink .so '/usr/lib/libsss_sudo.so' [dev-elf] So create a new sub-package libsss-sudo to package file libsss_sudo.so and make sssd rdepends on it. JP: Update for version differences. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit e81c15f851ca5396c78c8737967ee38db0ebe0cd) Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-09-09linux-%_5.%.bbappend: drop recipeArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 833ae34c8f3222358f65e8ee3fdbac565485694e)
2021-07-10tpm-tools: fix build issueArmin Kuster
This error occurs randomly. /bin/bash: pod2man: command not found [Yocto #14304] minor space/tab cleanup Signed-off-by: Armin Kuster <akuster808@gmail.com> Cc: Ben <koncept1@gmail.com>
2021-04-27initramfs-framework-ima: introduce IMA_FORCEMing Liu
Introduce IMA_FORCE to allow the IMA policy be applied forcely even 'no_ima' boot parameter is available. This ensures the end users have a way to disable 'no_ima' support if they want to, because it may expose a security risk if an attacker can find a way to change kernel arguments, it will easily bypass rootfs authenticity checks. Signed-off-by: Sergio Prado <sergio.prado@toradex.com> Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-27meta: drop IMA_POLICY from policy recipesMing Liu
IMA_POLICY is being referred as policy recipe name in some places and it is also being referred as policy file in other places, they are conflicting with each other which make it impossible to set a IMA_POLICY global variable in config file. Fix it by dropping IMA_POLICY definitions from policy recipes Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-27ima-evm-keys: add file-checksums to IMA_EVM_X509Ming Liu
This ensures when a end user change the IMA_EVM_X509 key file, ima-evm-keys recipe will be rebuilt. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-14tests: correctly escape # in MakefileOmer Akram
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-14Use C preprocessor from the yocto build environmentOmer Akram
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-14backport cross-compile python binding fixOmer Akram
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-04-14Update apparmor to 2.13.6Omer Akram
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04ima-policy-hashed: add CGROUP2_SUPER_MAGIC fsmagicMing Liu
This fixes following systemd boot issues: [ 7.455580] systemd[1]: Failed to create /init.scope control group: Permission denied [ 7.457677] systemd[1]: Failed to allocate manager object: Permission denied [!!!!!!] Failed to allocate manager object. [ 7.459270] systemd[1]: Freezing execution. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04ima-evm-rootfs.bbclass: avoid generating /etc/fstab for wicMing Liu
Or else wic will fail without "--no-fstab-update" option. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04initramfs-framework-ima: let ima_enabled return 0Ming Liu
Otherwise, ima script would not run as intended. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04README.md: update according to the refactoring in ima-evm-rootfs.bbclassMing Liu
Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04meta: refactor IMA/EVM sign rootfsMing Liu
The current logic in ima-evm-rootfs.bbclass does not guarantee ima_evm_sign_rootfs is the last function in IMAGE_PREPROCESS_COMMAND by appending to it, for instance, if there are other "_append" being used as it's the case in openembedded-core/meta/classes/image.bbclass: | IMAGE_PREPROCESS_COMMAND_append = " ${@ 'systemd_preset_all;' \ | if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) \ | and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, | False, d) else ''} reproducible_final_image_task; " and ima-evm-rootfs should be in IMAGE_CLASSES instead of in INHERIT since that would impact all recipes but not only image recipes. To fix the above issues, we introduce a ima_evm_sign_handler setting IMA/EVM rootfs signing requirements/dependencies in event bb.event.RecipePreFinalise, it checks 'ima' distro feature to decide if IMA/EVM rootfs signing logic should be applied or not. Also add ima-evm-keys to IMAGE_INSTALL. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04initramfs-framework-ima: RDEPENDS on ima-evm-keysMing Liu
Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04ima-evm-keys: add recipeMing Liu
Create a recipe to package IMA/EMV public keys. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04initramfs-framework-ima: fix a wrong pathMing Liu
/etc/ima-policy > /etc/ima/ima-policy. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-04ima-evm-utils: set native REQUIRED_DISTRO_FEATURES to emptyMing Liu
'ima' does not have to be in native DISTRO_FEATURES, unset it to avoid sanity check for ima-evm-utils-native. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-02-24kas-security-base: drop DL_DIRArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-17apparmor: fix QA warning with systemd enabledArmin Kuster
ERROR: apparmor-2.13.4-r0 do_package: QA Issue: apparmor: Files/directories were installed but not shipped in any package: /usr/lib/systemd /usr/lib/systemd/system /usr/lib/systemd/system/apparmor.service Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-17apparmor: fix issue with older use of shell in makeArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-17README: updated branch for DunfellArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-16ibmswtpm2: fix QA warningArmin Kuster
ibmswtpm2 doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-16layer.conf: use += instead of := to update BBFILESSajjad Ahmed
Updating BBFILES with := isn't the standard way and can break parsing under certain conditions, instead use += which is widely used. Signed-off-by: Sajjad Ahmed <sajjad_ahmed@mentor.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 63e1cf3ffa26a4e820ec8d882e67e438aa0d23ee)
2020-10-16scap-security-guide: add expat-native to DEPENDSMingli Yu
Add expat-native to DEPENDS to fix the below do_configure error: | CMake Error at CMakeLists.txt:165 (message): | xmlwf is required! Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 4c2f7ffd492c7083273aca7cc718802279f05ce2)
2020-10-16packagegroup-core-security: remove clamav from musl imageArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 496a734c14fc72250979a4e7eb69c5d541ffd870)
2020-10-16apparmor: fix build issue with ptest enabled.Armin Kuster
minor spacing cleanup Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 2a7963df18e7f43c6209387b6e1a1e75ff74b6ca)
2020-10-16linux-%/5.x: Add dm-verity fragment as neededNaveen Saini
Add checks that include dm-verity specific kernel config fragment when dm-verity-img.bbclass is used. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit d9feafe991cdf4084746c41438526dbf0b5dc2c8)
2020-10-16wic: add wks.in for intel dm-verityNaveen Saini
Based on systemd-bootdisk-microcode.wks.in, this adds the dm-verity image similar to the beaglebone wks already in meta-security. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 0de4f3bfb7fffe8d91026f00ce7f9384e13dfc54)
2020-10-16initramfs-framework/dmverity: add retry loop for slow boot devicesNaveen Saini
Detection of USB devices by the kernel is slow enough. We need to keep trying for a while (default: 5s seconds, controlled by roottimeout=<seconds>) and sleep between each attempt (default: one second, rootdelay=<seconds>). Fix is based on https://git.yoctoproject.org/cgit.cgi/poky/commit/meta/recipes-core/initrdscripts/initramfs-framework/rootfs?id=ee6a6c3461694ce09789bf4d852cea2e22fc95e4 Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit e23767fc72040cc58e638b08925ab467221c91f9)
2020-10-16apparmor: exclude mips64, not supportedArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit f176756890766bc9a6a00fe83bfe8e3c9bc13d07)
2020-10-16packagegroup-core-security: dont include suricata on riscv or ppcArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit caf76696e8669ee48339c13f01042da9e52515ae)
2020-10-16beaglebone-yocto-verity.wks.in: Refer IMGDEPLOYDIRniko.mauno@vaisala.com
Since dm-verity-image.bbclass effectively injects <DM_VERITY_IMAGE>:do_image_<DM_VERITY_IMAGE_TYPE> dependency for do_image_wic task, we can change verity rootfs artifact reference here from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR in order to mitigate following breakage which was observed when bitbaking <DM_VERITY_IMAGE> target from scratch (using sstate-cache provided artifacts): | wic.filemap.Error: cannot open image file '.../build/tmp/deploy/images/beaglebone-yocto/core-image-minimal-beaglebone-yocto.ext4.verity': [Errno 2] No such file or directory: '.../build/tmp/deploy/images/beaglebone-yocto/core-image-minimal-beaglebone-yocto.ext4.verity' | WARNING: exit code 1 from a shell command. | ERROR: Task (.../meta/recipes-core/images/core-image-minimal.bb:do_image_wic) failed with exit code '1' Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 4602d6420835a603fde6f3f25a87b19cbf721ed6)
2020-10-16dm-verity-image-initramfs: Drop locales from imageniko.mauno@vaisala.com
Since IMAGE_LINGUAS defaults to 'en-us en-gb' and since localization is not needed on this type of purpose-specific initramfs image, reset the variable which helps by shaving off almost 700kB from resulting bundled zImage-initramfs artifact. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 5f196cf59dc41584750c20dcc2a8e2ed5067ab7e)
2020-10-16dm-verity-image-initramfs: Add base-passwd packageniko.mauno@vaisala.com
This removes following boot-time complaints from udevd regarding missing group declarations: [ 6.624454] udevd[163]: specified group 'tty' unknown [ 6.625340] udevd[163]: specified group 'dialout' unknown [ 6.625692] udevd[163]: specified group 'kmem' unknown [ 6.626022] udevd[163]: specified group 'input' unknown [ 6.626541] udevd[163]: specified group 'video' unknown [ 6.626977] udevd[163]: specified group 'audio' unknown [ 6.627532] udevd[163]: specified group 'lp' unknown [ 6.628187] udevd[163]: specified group 'disk' unknown [ 6.628558] udevd[163]: specified group 'cdrom' unknown Size impact of this change on resulting bundled zImage-initramfs artifact is less than +1kB which is neglible. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit e88895e109929c3e97c29870275787e49faecdd4)
2020-10-16dm-verity-initramfs-image: Cosmetic improvementsniko.mauno@vaisala.com
- revise declaration ordering as suggested by oe-stylize.py - sort PACKAGE_INSTALL entries in alphabetic order - split long command line in deploy_verity_hash() Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 1d21cec5fda489f9ed7c1132b0abc18db3af6d41)
2020-10-16dm-verity-image-initramfs: Use initramfs-frameworkniko.mauno@vaisala.com
Switch from this layer's initramfs-dm-verity recipe to poky-provided initramfs-framework suite to manage veritysetup et al. This commit also removes initramfs-dm-verity recipe which is not referred from elsewhere in this meta layer. Also update the install path of dm-verity.env from /usr/share to /usr/share/misc in order to better comply with FHS3.0, see https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html#usrsharemiscMiscellaneousArchitecture Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 45e8b20cd022eb7b20d72c23db9fcc6824f08c7a)
2020-10-16initramfs-framework: Add dmverity moduleniko.mauno@vaisala.com
Add 'initramfs-module-dmverity' as an extension to poky upstream provided initramfs-framework suite via matchingly named bbappend file. Together with pre-existing 'initramfs-module-udev' this module can be used to facilitate dm-verity rootfs mounting from initramfs context that is bundled with Linux kernel. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 489f7c900c365e4b3198cff2f2fd7c38623b77e8)
2020-10-16dm-verity-img.bbclass: Stage verity.env fileniko.mauno@vaisala.com
Introduce new STAGING_VERITY_DIR variable specific to this bbclass which defines the directory where the verity.env file is stored during <DM_VERITY_IMAGE>:do_image_<DM_VERITY_IMAGE_TYPE> task and can consequtively be picked up into associated initramfs rootfs (which facilitates executing 'veritysetup' and related actions). By doing this we mitigate failures that were thus far associated to this facility, such as install: cannot stat '.../build/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4.verity.env': No such file or directory and install: cannot stat '.../build/tmp/deploy/images/beaglebone-yocto/core-image-minimal-beaglebone-yocto.ext4.verity.env': No such file or directory Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 170945ff9f8835ab7b0045b722c2a480b450ef90)
2020-10-16linux-yocto(-dev): Add dm-verity fragment as neededniko.mauno@vaisala.com
Add checks that include dm-verity specific kernel config fragment when dm-verity-img.bbclass is used. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 6f40921308be358ffce1a4e51a76672ad4168c21)
2020-10-16dm-verity-image-initramfs: Bind at do_image insteadniko.mauno@vaisala.com
Bind custom actions in this image recipe in do_image() rather than do_rootfs(), which can help shaving even dozens of seconds from duration of 'bitbake <DM_VERITY_IMAGE>' command re-execution. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 03fdaf2f0464b28ab69114330a543b3c64c19a5d)
2020-10-16dm-verity-image-initramfs: Ensure verity hash syncniko.mauno@vaisala.com
In order to ensure that the bundled initramfs always contains the most recently generated DM_VERITY_IMAGE specific root filesystems' root hash, we disable the timestamp for do_rootfs() task here, meaning that the task will be re-executed whenever some task that depends on it executes. Without this change, executing e.g. the following sequence $ bitbake <DM_VERITY_IMAGE> $ bitbake -c clean <DM_VERITY_IMAGE> $ bitbake <DM_VERITY_IMAGE> results in an unbootable <DM_VERITY_IMAGE> rootfs, which fails like Mounting /dev/vda over dm-verity as the root filesystem [ 8.729974] device-mapper: verity: sha256 using implementation sha256-generic [ 8.810784] device-mapper: verity: 253:0: metadata block 3017 is corrupted [ 8.813018] device-mapper: verity: 253:0: metadata block 3017 is corrupted [ 8.813912] Buffer I/O error on dev dm-0, logical block 2992, async page read Verity device detected corruption after activation. [ 8.889548] device-mapper: verity: 253:0: metadata block 3017 is corrupted [ 8.891060] device-mapper: verity: 253:0: metadata block 3017 is corrupted [ 8.891456] Buffer I/O error on dev dm-0, logical block 2992, async page read ... [ 9.135707] EXT4-fs (dm-0): unable to read superblock [ 9.142897] EXT4-fs (dm-0): unable to read superblock [ 9.145393] EXT4-fs (dm-0): unable to read superblock [ 9.147905] FAT-fs (dm-0): unable to read boot sector mount: /new_root: can't read superblock on /dev/mapper/rootfs. BusyBox v1.32.0 () multi-call binary. Usage: switch_root [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS] [ 9.243274] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 9.243701] CPU: 0 PID: 1 Comm: switch_root Not tainted 5.8.3-yocto-standard #1 [ 9.243853] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014 ... [ 9.248548] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]--- Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 4cf81a584773c9e946595ded9193723ebd6425e0)
2020-10-16dm-verity-img.bbclass: Reorder parse-time checkniko.mauno@vaisala.com
Relocate checking if DM_VERITY_IMAGE and DM_VERITY_IMAGE_TYPE are defined as non-empty strings before DM_VERITY_IMAGE vs. PN comparison is performed. By doing so we start seeing following kind of bitbake parse-time console warnings in case either DM_VERITY_IMAGE or DM_VERITY_IMAGE_TYPE is not set, when 'dm-verity-img' is defined in IMAGE_CLASSES: WARNING: .../meta/recipes-core/images/core-image-minimal.bb: dm-verity-img class inherited but not used WARNING: .../meta-openembedded/meta-oe/recipes-core/images/meta-oe-ptest-image.bb: dm-verity-img class inherited but not used whereas before this change this warning was printed only once, when image pointed by <DM_VERITY_IMAGE> was parsed (and recipe with that name could be found in BBFILES mask scipe), and DM_VERITY_IMAGE_TYPE was not set. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit fd23d5256513cdf6641d8dd421a5c75a9b78b7d9)