Commit Graph

780 Commits

Author SHA1 Message Date
Armin Kuster
d51c632edc layer.con: add DISTROOVERIDE for hardening
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-08-23 14:48:56 -07:00
Armin Kuster
94e8e61988 meta-harden: Add a layer to demo harding OE/YP
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-08-23 14:48:56 -07:00
Armin Kuster
787ba6faea trousers: Several Security fixes
Fixes:
CVE-2020-24332
CVE-2020-24330
CVE-2020-24331

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-08-17 15:08:14 -07:00
Kai Kang
98e0a3ecf8 libseccomp: fix cross compile error for mips
Backport patch to fix cross compile error for mips:

| syscalls.h:44:6: error: expected identifier or '(' before numeric constant
|    44 |  int mips;
|       |      ^~~~

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-08-04 10:41:00 -07:00
Charlie Davies
3becd114a2 clamav: add INSTALL_CLAMAV_CVD flag to do_install
Recipe provides INSTALL_CLAMAV_CVD flag to bypass clamav
cvd db creation. During do_install this flag should be
used to conditionally skip install of cvd db if needed.

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-08-04 10:41:00 -07:00
Armin Kuster
fcceba2208 packagegroup-core-security: restore riscv64 for libssecomp
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-27 22:22:17 -07:00
Armin Kuster
04de3591c1 libseccomp: update to 2.5.0
Notable changes:
Add support for the 64-bit RISC-V architecture
Update the syscall tables to Linux v5.8.0-rc5
Python bindings and build now default to Python 3.x

for more info see: https://github.com/seccomp/libseccomp/blob/master/CHANGELOG

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-27 22:22:17 -07:00
Armin Kuster
29f47b4485 packagegroup-core-security: remove libseccomp for riscv*
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-27 22:22:17 -07:00
Armin Kuster
b5a5cbe1f5 libsecomp: rv32/rv64 target builds are not supported yet
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-27 22:22:01 -07:00
Armin Kuster
98ff502d40 packagegroup-core-security: remove clamav for riscv*
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 09:00:39 -07:00
Armin Kuster
38715478be packagegroup-security-tpm: add more packages for building
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 09:00:39 -07:00
Armin Kuster
5af1689eae security packagegroups: move to recipes-core
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 09:00:39 -07:00
Armin Kuster
5392cb9baa security images: Move to recipe-core
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 09:00:39 -07:00
Yi Zhao
f923d63820 ibmswtpm2: upgrade 1563 -> 1628
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 09:00:39 -07:00
Armin Kuster
6a8ad0efe7 lynis: update to 3.0.0
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 08:58:38 -07:00
Armin Kuster
066a04425c drop ci-build: it is hiding errors
call kas from .gitlab-ci
fix typos
add missing mips64 file
add main layer workaround

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-24 09:59:33 -07:00
Armin Kuster
4dc69a7550 kas: add ima, tpm and tpm2 build configs
for qemux86, qemux86-64 and qemuarm64

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-19 19:19:59 -07:00
Armin Kuster
171c3da430 add gitlab framework and qemu machine
Machines:
qemux86
qemux86-64
qemuarm
qemuarm64
qemuppc
qemumips84
qemuriscv64

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:33:23 -07:00
Armin Kuster
f876289913 meta-integrity: add dynamic-layer for strongswan
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:44 -07:00
Armin Kuster
9f8bdb7751 strongswan: Add bbappends for ima changes
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:44 -07:00
Armin Kuster
fc1693a967 layer.conf: add dynamic-layer for strongswan
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:44 -07:00
Armin Kuster
f4dd53438a strongswan: add bbappends for tpm changes
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:44 -07:00
Armin Kuster
fcd4121f0b python3-privacyidea: adding initial support for mfa
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:44 -07:00
Armin Kuster
ae4a8aeb48 python3-oauth2client: add recipe
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-18 18:26:35 -07:00
Jeremy Puhlman
ed7875b085 packagegroup-security-tpm2: Depend on preferred provider for cryptsetup
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-14 21:30:07 -07:00
Jeremy Puhlman
bedfdc1fb9 cryptsetup-tpm-incubator: RPROVIDES cryptsetup and cryptsetup-dev
Without this we get weird conflict when you include dev packages:
rror: Transaction check error:
  file /usr/include/libcryptsetup.h conflicts between attempted installs of
cryptsetup-tpm-incubator-dev-0.9.9-r0.corei7_64 and
lib32-cryptsetup-dev-2.3.2-r0.1.i586
  file /usr/lib64/libcryptsetup.so conflicts between attempted installs of
cryptsetup-tpm-incubator-dev-0.9.9-r0.corei7_64 and
cryptsetup-dev-2.3.2-r0.1.corei7_64
  file /usr/lib64/pkgconfig/libcryptsetup.pc conflicts between attempted
installs of cryptsetup-tpm-incubator-dev-0.9.9-r0.corei7_64 and
cryptsetup-dev-2.3.2-r0.1.corei7_64
  file /usr/lib/libcryptsetup.so conflicts between attempted installs of
lib32-cryptsetup-tpm-incubator-dev-0.9.9-r0.i586 and
lib32-cryptsetup-dev-2.3.2-r0.1.i586
  file /usr/lib/pkgconfig/libcryptsetup.pc conflicts between attempted installs
of lib32-cryptsetup-tpm-incubator-dev-0.9.9-r0.i586 and
lib32-cryptsetup-dev-2.3.2-r0.1.i586

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-14 21:30:07 -07:00
Zheng Ruoqin
1a69ba09cf bastille: Deleted redundant inherit to fix error when enable multilib.
There is no need to inherit module-base. Because this inherit will stop
bastille to build to lib32-bastille.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-14 19:44:48 +00:00
Zheng Ruoqin
376fad4de1 ccs-tools:Fix build error when enable multilib.
ERROR: lib32-ccs-tools-1.8.4-r0 do_install: oe_runmake failed
ERROR: lib32-ccs-tools-1.8.4-r0 do_install: Execution of
'/build-armv8/tmp/work/armv7ahf-neon-mllib32-linux-gnueabi/lib32-ccs-tools/1.8.4-r0/temp/run.do_install.22368'
failed with exit code 1:
make: *** No rule to make target 'install'.  Stop.
WARNING: exit code 1 from a shell command.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-14 19:44:48 +00:00
Armin Kuster
547f552c85 isafw.bbclass: typo in layer name
move class to proper layer

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-06 09:41:26 -07:00
Armin Kuster
a2a102b2de packagegroup-core-security-ptest: update fail2ban ptest pkg name
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-06 09:41:09 -07:00
Armin Kuster
3283cf26ad suricata: update to 4.1.8
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-06 09:40:59 -07:00
Kai Kang
7831969f8c sssd: disable build secrets
It requires http_parser.h to build secrets:

| configure: error:
| You must have the header file http_parser.h installed to build sssd
| with secrets responder. If you want to build sssd without secret responder
| then specify --without-secrets when running configure.

The header file is from package http-parser[1] rather than apache2. But
there is no recipe http-parser in openembedded. So disable build secrets
for sssd and remove related systemd service and socket files.

Reference:
1. https://github.com/nodejs/http-parser

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-23 08:00:52 -07:00
Alexander Kanavin
3018714159 apparmor: pull in coreutils/findutils only when not using systemd as init manager
The utilities from those packages (xargs, comm) are only used in sysvinit
scripts, and so there is no need to pull them in when systemd is in use.
Both are gpl3 licensed, so this is beneficial for builds where gpl3 is not
allowed.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Jeremy Puhlman
9d93ad22a0 tripwire: Remove makefiles from the man directories.
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Jeremy Puhlman
b78a433767 clamav: resolve multilib issues
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
1fb8497081 tpm2-tcti-uefi: drop patch no longer needed
drop tpm2-get-caps-fixed.patch, tss update negated the need for this
change.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
a08e845642 openscap: update to 1.3.3
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
3cd65d96c1 libtpm: update to 0.7.2
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
26bb4e7d08 tpm2-pkcs11: update 1.2.0
add yaml package
Updated LICNESE

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
60f93f8066 tpm2-tss-engine: add branch to SRC_URI & update to tip
LICENSE changed to BSD 3

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
df8a690941 tpm2-tss: update to 2.4.1
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Armin Kuster
d9d31d1f66 tpm2-tools: update to 4.1.3
LICENSE changed to BSD3

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:16 -07:00
Haseeb Ashraf
95fe86eb98 samhain: dnmalloc hash fix for aarch64 and mips64
fix runtime error:
samhain[4069]: FATAL: x_dnmalloc.c: 2790: hashval < AMOUNTHASH
Killed

The proper fix is not to disable dnmalloc. This change is in
continuation of samhain-mips64-aarch64-dnmalloc-hash-fix.patch
which requires CONFIG_ARCH_AARCH64 or CONFIG_ARCH_MIPS64 to be
defined for the corresponding architecture

Signed-off-by: Haseeb Ashraf <Haseeb_Ashraf@mentor.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-05-15 05:28:21 -07:00
Yi Zhao
9168152b1e samhain-server: add volatile file for systemd
Add volatile file to create /var/log/yule when using systemd. Also
remove unused /var/log directory in do_install.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-05-15 05:28:21 -07:00
Bartosz Golaszewski
d6369c9aaf dm-verity: add a working example for BeagleBone Black
This adds various bits and pieces to enable generating a working example
of a full chain of trust up to dm-verity-protected rootfs level on Beagle
Bone Black.

The new initramfs is quite generic and should work for other SoCs as well
when using fitImage.

The following config can be used with current master poky,
meta-openembedded & meta-security to generate a BBB image using verified
boot and dm-verity.

  UBOOT_SIGN_KEYDIR = "/tmp/test-keys/"
  UBOOT_SIGN_KEYNAME = "dev"
  UBOOT_SIGN_ENABLE = "1"
  UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
  UBOOT_MACHINE_beaglebone-yocto = "am335x_boneblack_vboot_config"

  IMAGE_CLASSES += "dm-verity-img"
  IMAGE_FSTYPES += "wic.xz ext4"

  DM_VERITY_IMAGE = "core-image-full-cmdline"
  DM_VERITY_IMAGE_TYPE = "ext4"

  KERNEL_CLASSES += "kernel-fitimage"
  KERNEL_IMAGETYPE_beaglebone-yocto = "fitImage"

  IMAGE_INSTALL_remove = " kernel-image-zimage"
  IMAGE_BOOT_FILES_remove = " zImage"
  IMAGE_BOOT_FILES_append = " fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE};fitImage"

  # Using systemd is not strictly needed but deals nicely with read-only
  # filesystem by default.
  DISTRO_FEATURES_append = " systemd"
  DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
  VIRTUAL-RUNTIME_init_manager = "systemd"
  VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

  INITRAMFS_IMAGE = "dm-verity-image-initramfs"
  INITRAMFS_FSTYPES = "cpio.gz"
  INITRAMFS_IMAGE_BUNDLE = "1"

  WKS_FILE = "beaglebone-yocto-verity.wks.in"

  KERNEL_FEATURES_append = " features/device-mapper/dm-verity.scc"

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-05-15 05:28:21 -07:00
Bartosz Golaszewski
b329e1650d classes: provide a class for generating dm-verity meta-data images
This adds a class that allows to generate conversions of ext[234] and
btrfs partitions images with dm-verity hash data appended at the end as
well as a corresponding .env file containing the root hash and data
offset that can be stored in a secure location (e.g. signed fitImage)
or signed and verified at run-time on its own.

The class depends on two variables:
  DM_VERITY_IMAGE:      defines the name of the main image (normally the
                        one that is used with the bitbake command to
                        build the main image)
  DM_VERITY_IMAGE_TYPE: defines exactly one type for which to generate
                        the protected image.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-05-15 05:28:21 -07:00
Armin Kuster
20ef03b0f1 buck-security: fix runtime issue with missing per module
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-05-15 05:20:31 -07:00
Jan Luebbe
f1ca0f9117 apparmor: update to 2.13.4
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-04-07 11:50:02 -07:00
Jan Luebbe
e45b54998c apparmor: fix wrong executable permission on service file
This avoids "systemd[1]: Configuration file
/lib/systemd/system/apparmor.service is marked executable. Please remove
executable permission bits. Proceeding anyway." on boot.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-04-07 11:49:54 -07:00
Armin Kuster
98a6664408 arpwatch: add new recipe
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00