Commit Graph

739 Commits

Author SHA1 Message Date
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
Martin Jansa
7f7897590c layer.conf: update LAYERSERIES_COMPAT for dunfell
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
47de50efdb sssd: Add infopipe PACKAGECONFIG
infopipe was previously on by default, so add it to the default
PACKAGECONFIG.

The systemd files are only installed when --with-infopipe is passed to
configure, so conditionally add them to SYSTEMD_SERVICE.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
e54b07c3d4 sssd: Add missing DEPENDS on jansson
When building with the curl PACKAGECONFIG, sssd will depend on the
jansson library.

Fixes the following error:
    | checking for JANSSON... no
    | checking jansson.h usability... no
    | checking jansson.h presence... no
    | checking for jansson.h... no
    | configure: error:
    | You must have the header file jansson.h installed to build sssd
    | with secrets and KCM responder. If you want to build sssd without
    these
    | responders then specify --without-secrets --without-kcm when running
    configure.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
cf423c05bf sssd: Add missing files to SYSTEMD_SERVICE
These files are installed when the ssh or curl PACKAGECONFIGs are enabled.

Fixes the following error:

    ERROR: sssd-1.16.4-r0 do_package: QA Issue: sssd: Files/directories were
      installed but not shipped in any package:
        /lib/systemd/system/sssd-kcm.socket
        /lib/systemd/system/sssd-kcm.service
        /lib/systemd/system/sssd-ssh.socket
        /lib/systemd/system/sssd-ssh.service

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
52e3654d34 sssd: Add sudo PACKAGECONFIG
sudo was previously on by default, so add it to the default
PACKAGECONFIG.

The systemd files are only installed when --with-sudo is passed to
configure, so conditionally add them to SYSTEMD_SERVICE.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
79d9fc23e2 sssd: Add autofs PACKAGECONFIG
autofs was previously on by default, so add it to the default
PACKAGECONFIG.

The systemd files are only installed when --with-autofs is passed to
configure, so conditionally add them to SYSTEMD_SERVICE.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Jonatan Pålsson
70a4908a97 sssd: Sort PACKAGECONFIG entries
Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
5b82f67c48 buck-security: move to recipes-scanners
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
7beb91332f checksecurity: move to recipes-scanners
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
a9e3b04576 checksec: move to recipe-scanners
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
e4a2dd0b4a clamav: move to recipes-scanners
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
4447296ca3 chkrootkit: add rootkit recipe
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
d2c383fa63 fail2ban: change hardcoded sysklogd to VIRTUAL-RUNTIME_base-utils-syslog
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
bc7b81685c lynis: add missing rdepends
add findutils

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Yi Zhao
1f7ca85929 openscap-daemon: add missing runtime dependencies
Add missing runtime dependencies otherwise /usr/bin/oscapd can not
startup.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
4229f5025e libseccomp: update to 2.4.3
dropped patch now included in update

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:13:07 -07:00
Armin Kuster
96737082ad sssd: python2 not supported
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:13:07 -07:00
André Draszik
d7ca573c36 linux-yocto: update the bbappend to 5.x
As linux-yocto upgraded to 5.x in oe-core, update
the bbappend to 5.x to remove the warning

ERROR: No recipes available for:
  .../meta-security/meta-tpm/recipes-kernel/linux/linux-yocto_4.%.bbappend

This patch hasn't been verified any further than allowing bitbake
to complete with a non-linux-yocto kernel. In particular options could
be different, or new ones needed / desired.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:13:07 -07:00
Jonatan Pålsson
6eaee464bf sssd: DEPEND on nss if nothing else is chosen
sssd will attempt to build against nss if no crypto is selected. If a
bbappend sets PACKAGECONFIG = <list without nss or crypto>, the
appropriate DEPEND is not established.

Fixes the following configure error:

    ... snip ...
    | checking for NSS... configure: error: Package requirements (nss) were not met:
    |
    | No package 'nss' found
    |
    | Consider adjusting the PKG_CONFIG_PATH environment variable if you
    | installed software in a non-standard prefix.
    |
    | Alternatively, you may set the environment variables NSS_CFLAGS
    | and NSS_LIBS to avoid the need to call pkg-config.
    | See the pkg-config man page for more details.
    |
    | WARNING: exit code 1 from a shell command.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:13:07 -07:00
Jonatan Pålsson
1c22721eae sssd: Fix typo in PACKAGECONFIG. cyrpto -> crypto
Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:13:07 -07:00
Jonatan Pålsson
a509e21902 sssd: Add PACKAGECONFIG for python2
Fixes the following build error:

    .. snip ..
    | checking for python2... no
    | checking for python3... (cached) python3.8
    | configure: error:
    | The program python2 was not found in search path.
    | Please ensure that it is installed and its directory is included in the search
    | path. It is required for building python2 bindings. If you do not want to build
    | them please use argument --without-python2-bindings when running configure.
    | WARNING: exit code 1 from a shell command.

Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-08 14:12:59 -07:00
Jonatan Pålsson
d1a0d18d3e README: Add meta-python to list of layer deps
Signed-off-by: Jonatan Pålsson <jonatan.p@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 08:06:51 -08:00
Armin Kuster
69ad1d51fd libtpm: fix build issue over pod2man
/bin/bash: pod2man: command not found
| Makefile:585: recipe for target 'TPMLIB_CancelCommand.3' failed

inherit perlnative to fix

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 08:06:51 -08:00
Kai Kang
4375507f39 sssd: fix for ldblibdir and systemd etc
Fix sssd issue for ldblibdir, systemd, pam etc.

* fix ldblibdir which is not calculated right for cross compile
* create directory /var/log/sssd which is required by sssd daemon
* disable building python2 binding
* fix pam module path
* update systemd configure options and service files

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 08:06:51 -08:00
Mingli Yu
15061e3a4e linux-yocto: update the bbappend to 5.x
As linux-yocto upgraded to 5.x in oe-core, update
the bbappend to 5.x to remove the warning:

WARNING: No recipes available for:
  /buildarea/layers/meta-security/recipes-kernel/linux/linux-yocto_4.%.bbappend

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
[Droped 4.x part]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 08:06:44 -08:00
Yi Zhao
b23e7eac2d scap-security-guide: pass the correct schema file path to openscap-native
There is a build error when using openscap-native sstate cache.
Steps to reproduce:
Create a new build project in build-1 directory.
$ bitbake openscap-native
Then remove the whole build directory only keep the sstate-cache
directory as a sstate mirror.

Create another new build project in build-2 directory.
Set SSTATE_MIRRORS
$ bitbake scap-security-guide

Error message:
OpenSCAP Error: Schema file 'xccdf/1.1/xccdf-schema.xsd' not found in path
'/buildarea/build-1/tmp/work-shared/openscap/oscap-build-artifacts/usr/share/openscap/schemas' when trying to validate
'/buildarea/build-2/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/jre/xccdf-unlinked-resolved.xml'
[/buildarea/build-1/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/validate.c:104]

The oscap command from openscap-native tries to find the schema files in
build-1 directory since these paths are hardcoded when building
openscap-native.

We need to pass the correct schema/xslt/cpe paths to oscap to make sure
it can find the files in right location.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 07:20:07 -08:00
Armin Kuster
17b0f42647 secuirty*-image: remove dead var and minor cleanup
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Bartosz Golaszewski
a3f5288624 linux: drop the bbappend for linux v4.x series
v4.19 LTS has been dropped in poky in favor of v5.4. Drop the bbappend
from meta-security as right now the build fails.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
290b4bbf8c clamav-native: missed bison fix
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
209ccfea1a README.md: update to new maintainer
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
7fcf17b9fe layer.conf: add zeus
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
0e0472f376 isafw: fix to work against master
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
4842e14299 meta-security-isafw: import layer from Intel
take over layer

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
73cb9a32dc clamav: add bison-native to depend
fixes build issue:
clamav/0.101.5-r0/git/config/ylwrap: line 176: yacc: command not found

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-01 22:16:14 -08:00
Armin Kuster
0d8cee5029 apparmor: update to tip
fixes Python3.8 configure issues

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-17 19:13:30 -08:00
Armin Kuster
2a91f5cc62 google-authenticator-libpam: install module in pam location
pam_google_authenticator.so was being installed where pam could not find
it. Move it where the rest of the pam modules site.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-16 08:49:20 -08:00
Armin Kuster
238b8936e6 python3-fail2ban: add 2-3 conversion changes
Had to use the fail2ban-2.3 program to create py3 code
Add it as a patch

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-16 08:48:43 -08:00
Armin Kuster
676d7166a2 ibmswtpm2: update to 1563
fix build issue

[v2]
Fix subject line

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-10 19:13:52 -08:00
Armin Kuster
5f258016b3 tpm2-tss: update to 2.3.2
clean up reciped. drop git fetching

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-10 19:13:52 -08:00
Armin Kuster
e87130f429 tpm2-tcti-uefi: fix build issue for i386 machine
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-10 19:13:52 -08:00
Armin Kuster
f2e9e8f96f tpm2-tools: update to 4.1.1
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-10 19:13:52 -08:00