Files
ports/security/trousers/Makefile
T
Niclas Zeising 7671dd5ccb security/trousers: fix security issues
Fix three security issues in security/trousers:

* CVE-2020-24332
  If the tcsd daemon is started with root privileges,
  the creation of the system.data file is prone to symlink attacks

* CVE-2020-24330
  If the tcsd daemon is started with root privileges,
  it fails to drop the root gid after it is no longer needed

* CVE-2020-24331
  If the tcsd daemon is started with root privileges,
  the tss user has read and write access to the /etc/tcsd.conf file

Add patches to fix potential use-after-free
Fix build with -fno-common

MFH:		2020Q3
Security:	e37a0a7b-e1a7-11ea-9538-0c9d925bbbc0
2020-08-18 23:23:22 +00:00

51 lines
1.2 KiB
Makefile

# Created by: Sebastian Schuetz <sschuetz@fhm.edu>
# $FreeBSD$
PORTNAME= trousers
PORTVERSION= 0.3.14
PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= SF
MAINTAINER= hrs@FreeBSD.org
COMMENT= Open-source TCG Software Stack
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= tpm-emulator>=0.7.4_1:emulators/tpm-emulator
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= dos2unix alias autoreconf gmake iconv libtool pkgconfig ssl
DOS2UNIX_GLOB= *.h *.c
NO_WRKSUBDIR= yes
USE_LDCONFIG= YES
USE_RC_SUBR= tcsd
INSTALL_TARGET= install-strip
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --with-gui=none --enable-static \
--localstatedir=${PREFIX}/var \
--with-tssuser=${USERS} \
--with-tssgroup=${GROUPS} \
--with-openssl=${OPENSSLBASE} \
RANLIB=:
MAKE_ENV= ICONV_LIB=${ICONV_LIB} \
ICONV_PREFIX=${ICONV_PREFIX}
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
SUB_FILES= pkg-message
SUB_LIST= USERS="${USERS}" GROUPS="${GROUPS}"
PLIST_SUB= USERS="${USERS}" GROUPS="${GROUPS}"
USERS= _tss
GROUPS= _tss
OPTIONS_DEFINE= DEBUG
DEBUG_CONFIGURE_ENABLE= debug
post-install:
${INSTALL_DATA} \
${WRKSRC}/dist/tcsd.conf ${STAGEDIR}${PREFIX}/etc/tcsd.conf.sample
@${MKDIR} ${STAGEDIR}${PREFIX}/var/lib/tpm
.include <bsd.port.mk>