Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Replace build.Dockerfile with build-openvas-smb-action compos… #90

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

robert-schardt
Copy link
Contributor

What

We decided to do some refactoring for openvas-smb.

openvas-smb-build build is deprecated.

But there are still workflows using that openvas-smb-build image.

Therefore we gonna replace the openvas-smb-build image with a manual step or composite action if used on multiple occasions.

Why

Removing build.Dockerfile and build-container.yml results in less code which is more maintainable.

References

https://jira.greenbone.net/browse/DEVOPS-1245

Checklist

  • Tests

@robert-schardt robert-schardt requested review from a team as code owners September 26, 2024 14:43
Copy link
Member

@y0urself y0urself left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call me a nitpicker ... or a inch pincher :D ^^

.github/workflows/codeql.yml Outdated Show resolved Hide resolved
.github/workflows/codeql.yml Outdated Show resolved Hide resolved
y0urself
y0urself previously approved these changes Sep 30, 2024
Copy link

github-actions bot commented Sep 30, 2024

🔍 Vulnerabilities of harbor-os.greenbone.net/community/openvas-smb:90-merge-amd64

📦 Image Reference harbor-os.greenbone.net/community/openvas-smb:90-merge-amd64
digestsha256:94c558f4510f94b6020a31899128e6979550c583037c8fdf314c1b9dd5d7d43a
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 28
size39 MB
packages145
📦 Base Image debian:stable-20240926-slim
also known as
  • stable-slim
digestsha256:adea3605ec6fd79b351f040666f7f2a5e9ec4f93d2902c982b81e4e4231a5903
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 23
critical: 0 high: 0 medium: 0 low: 7 glibc 2.36-9+deb12u8 (deb)

pkg:deb/debian/[email protected]%2Bdeb12u8?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2019--9192

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score0.11%
EPSS Percentile44th percentile
Description

In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(|)(\1\1)*' in grep, a different issue than CVE-2018-20796. NOTE: the software maintainer disputes that this is a vulnerability because the behavior occurs only with a crafted pattern

low : CVE--2019--1010025

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score0.35%
EPSS Percentile72nd percentile
Description

GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may guess the heap addresses of pthread_created thread. The component is: glibc. NOTE: the vendor's position is "ASLR bypass itself is not a vulnerability.

low : CVE--2019--1010024

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score3.02%
EPSS Percentile91st percentile
Description

GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass ASLR using cache of thread stack and heap. The component is: glibc. NOTE: Upstream comments indicate "this is being treated as a non-security bug and no real threat.

low : CVE--2019--1010023

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score1.20%
EPSS Percentile86th percentile
Description

GNU Libc current is affected by: Re-mapping current loaded library with malicious ELF file. The impact is: In worst case attacker may evaluate privileges. The component is: libld. The attack vector is: Attacker sends 2 ELF files to victim and asks to run ldd on it. ldd execute code. NOTE: Upstream comments indicate "this is being treated as a non-security bug and no real threat.

low : CVE--2019--1010022

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score0.41%
EPSS Percentile74th percentile
Description

GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass stack guard protection. The component is: nptl. The attack vector is: Exploit stack buffer overflow vulnerability and use this bypass vulnerability to bypass stack guard. NOTE: Upstream comments indicate "this is being treated as a non-security bug and no real threat.

low : CVE--2018--20796

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score0.44%
EPSS Percentile75th percentile
Description

In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(\227|)(\1\1|t1|\\2537)+' in grep.

low : CVE--2010--4756

Affected range>=2.36-9+deb12u8
Fixed versionNot Fixed
EPSS Score0.82%
EPSS Percentile82nd percentile
Description

The glob implementation in the GNU C Library (aka glibc or libc6) allows remote authenticated users to cause a denial of service (CPU and memory consumption) via crafted glob expressions that do not match any pathnames, as demonstrated by glob expressions in STAT commands to an FTP daemon, a different vulnerability than CVE-2010-2632.

critical: 0 high: 0 medium: 0 low: 4 openldap 2.5.13+dfsg-5 (deb)

pkg:deb/debian/[email protected]%2Bdfsg-5?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2020--15719

Affected range>=2.5.13+dfsg-5
Fixed versionNot Fixed
EPSS Score0.16%
EPSS Percentile54th percentile
Description

libldap in certain third-party OpenLDAP packages has a certificate-validation flaw when the third-party package is asserting RFC6125 support. It considers CN even when there is a non-matching subjectAltName (SAN). This is fixed in, for example, openldap-2.4.46-10.el8 in Red Hat Enterprise Linux.

low : CVE--2017--17740

Affected range>=2.5.13+dfsg-5
Fixed versionNot Fixed
EPSS Score0.41%
EPSS Percentile74th percentile
Description

contrib/slapd-modules/nops/nops.c in OpenLDAP through 2.4.45, when both the nops module and the memberof overlay are enabled, attempts to free a buffer that was allocated on the stack, which allows remote attackers to cause a denial of service (slapd crash) via a member MODDN operation.

low : CVE--2017--14159

Affected range>=2.5.13+dfsg-5
Fixed versionNot Fixed
EPSS Score0.04%
EPSS Percentile10th percentile
Description

slapd in OpenLDAP 2.4.45 and earlier creates a PID file after dropping privileges to a non-root account, which might allow local users to kill arbitrary processes by leveraging access to this non-root account for PID file modification before a root script executes a "kill cat /pathname" command, as demonstrated by openldap-initscript.

low : CVE--2015--3276

Affected range>=2.5.13+dfsg-5
Fixed versionNot Fixed
EPSS Score0.42%
EPSS Percentile74th percentile
Description

The nss_parse_ciphers function in libraries/libldap/tls_m.c in OpenLDAP does not properly parse OpenSSL-style multi-keyword mode cipher strings, which might cause a weaker than intended cipher to be used and allow remote attackers to have unspecified impact via unknown vectors.

critical: 0 high: 0 medium: 0 low: 4 systemd 252.30-1~deb12u2 (deb)

pkg:deb/debian/[email protected]~deb12u2?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2023--31439

Affected range>=252.30-1~deb12u2
Fixed versionNot Fixed
EPSS Score0.10%
EPSS Percentile41st percentile
Description

An issue was discovered in systemd 253. An attacker can modify the contents of past events in a sealed log file and then adjust the file such that checking the integrity shows no error, despite modifications. NOTE: the vendor reportedly sent "a reply denying that any of the finding was a security vulnerability."

low : CVE--2023--31438

Affected range>=252.30-1~deb12u2
Fixed versionNot Fixed
EPSS Score0.10%
EPSS Percentile41st percentile
Description

An issue was discovered in systemd 253. An attacker can truncate a sealed log file and then resume log sealing such that checking the integrity shows no error, despite modifications. NOTE: the vendor reportedly sent "a reply denying that any of the finding was a security vulnerability."

low : CVE--2023--31437

Affected range>=252.30-1~deb12u2
Fixed versionNot Fixed
EPSS Score0.09%
EPSS Percentile39th percentile
Description

An issue was discovered in systemd 253. An attacker can modify a sealed log file such that, in some views, not all existing and sealed log messages are displayed. NOTE: the vendor reportedly sent "a reply denying that any of the finding was a security vulnerability."

low : CVE--2013--4392

Affected range>=252.30-1~deb12u2
Fixed versionNot Fixed
EPSS Score0.04%
EPSS Percentile5th percentile
Description

systemd, when updating file permissions, allows local users to change the permissions and SELinux security contexts for arbitrary files via a symlink attack on unspecified files.

critical: 0 high: 0 medium: 0 low: 2 perl 5.36.0-7+deb12u1 (deb)

pkg:deb/debian/[email protected]%2Bdeb12u1?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2023--31486

Affected range>=5.36.0-7+deb12u1
Fixed versionNot Fixed
EPSS Score0.33%
EPSS Percentile71st percentile
Description

HTTP::Tiny before 0.083, a Perl core module since 5.13.9 and available standalone on CPAN, has an insecure default TLS configuration where users must opt in to verify certificates.

low : CVE--2011--4116

Affected range>=5.36.0-7+deb12u1
Fixed versionNot Fixed
EPSS Score0.24%
EPSS Percentile65th percentile
Description

_is_safe in the File::Temp module for Perl does not properly handle symlinks.

critical: 0 high: 0 medium: 0 low: 2 shadow 1:4.13+dfsg1-1 (deb)

pkg:deb/debian/shadow@1:4.13%2Bdfsg1-1?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2019--19882

Affected range>=1:4.13+dfsg1-1
Fixed versionNot Fixed
EPSS Score0.04%
EPSS Percentile5th percentile
Description

shadow 4.8, in certain circumstances affecting at least Gentoo, Arch Linux, and Void Linux, allows local users to obtain root access because setuid programs are misconfigured. Specifically, this affects shadow 4.8 when compiled using --with-libpam but without explicitly passing --disable-account-tools-setuid, and without a PAM configuration suitable for use with setuid account management tools. This combination leads to account management tools (groupadd, groupdel, groupmod, useradd, userdel, usermod) that can easily be used by unprivileged local users to escalate privileges to root in multiple ways. This issue became much more relevant in approximately December 2019 when an unrelated bug was fixed (i.e., the chmod calls to suidusbins were fixed in the upstream Makefile which is now included in the release version 4.8).

low : CVE--2007--5686

Affected range>=1:4.13+dfsg1-1
Fixed versionNot Fixed
EPSS Score0.14%
EPSS Percentile51st percentile
Description

initscripts in rPath Linux 1 sets insecure permissions for the /var/log/btmp file, which allows local users to obtain sensitive information regarding authentication attempts. NOTE: because sshd detects the insecure permissions and does not log certain events, this also prevents sshd from logging failed authentication attempts by remote attackers.

critical: 0 high: 0 medium: 0 low: 1 util-linux 2.38.1-5+deb12u1 (deb)

pkg:deb/debian/[email protected]%2Bdeb12u1?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2022--0563

Affected range>=2.38.1-5+deb12u1
Fixed versionNot Fixed
EPSS Score0.05%
EPSS Percentile18th percentile
Description

A flaw was found in the util-linux chfn and chsh utilities when compiled with Readline support. The Readline library uses an "INPUTRC" environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. This flaw allows an unprivileged user to read root-owned files, potentially leading to privilege escalation. This flaw affects util-linux versions prior to 2.37.4.

critical: 0 high: 0 medium: 0 low: 1 coreutils 9.1-1 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2017--18018

Affected range>=9.1-1
Fixed versionNot Fixed
EPSS Score0.04%
EPSS Percentile5th percentile
Description

In GNU Coreutils through 8.29, chown-core.c in chown and chgrp does not prevent replacement of a plain file with a symlink during use of the POSIX "-R -L" options, which allows local users to modify the ownership of arbitrary files by leveraging a race condition.

critical: 0 high: 0 medium: 0 low: 1 sqlite3 3.40.1-2 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2021--45346

Affected range>=3.40.1-2
Fixed versionNot Fixed
EPSS Score0.22%
EPSS Percentile60th percentile
Description

A Memory Leak vulnerability exists in SQLite Project SQLite3 3.35.1 and 3.37.0 via maliciously crafted SQL Queries (made via editing the Database File), it is possible to query a record, and leak subsequent bytes of memory that extend beyond the record, which could let a malicious user obtain sensitive information. NOTE: The developer disputes this as a vulnerability stating that If you give SQLite a corrupted database file and submit a query against the database, it might read parts of the database that you did not intend or expect.

critical: 0 high: 0 medium: 0 low: 1 tar 1.34+dfsg-1.2+deb12u1 (deb)

pkg:deb/debian/[email protected]%2Bdfsg-1.2%2Bdeb12u1?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2005--2541

Affected range>=1.34+dfsg-1.2+deb12u1
Fixed versionNot Fixed
EPSS Score0.69%
EPSS Percentile80th percentile
Description

Tar 1.15.1 does not properly warn the user when extracting setuid or setgid files, which may allow local users or remote attackers to gain privileges.

critical: 0 high: 0 medium: 0 low: 1 libgcrypt20 1.10.1-3 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2018--6829

Affected range>=1.10.1-3
Fixed versionNot Fixed
EPSS Score0.19%
EPSS Percentile57th percentile
Description

cipher/elgamal.c in Libgcrypt through 1.8.2, when used to encrypt messages directly, improperly encodes plaintexts, which allows attackers to obtain sensitive information by reading ciphertext data (i.e., it does not have semantic security in face of a ciphertext-only attack). The Decisional Diffie-Hellman (DDH) assumption does not hold for Libgcrypt's ElGamal implementation.

critical: 0 high: 0 medium: 0 low: 1 gcc-12 12.2.0-14 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2022--27943

Affected range>=12.2.0-14
Fixed versionNot Fixed
EPSS Score0.07%
EPSS Percentile32nd percentile
Description

libiberty/rust-demangle.c in GNU GCC 11.2 allows stack consumption in demangle_const, as demonstrated by nm-new.

critical: 0 high: 0 medium: 0 low: 1 gnutls28 3.7.9-2+deb12u3 (deb)

pkg:deb/debian/[email protected]%2Bdeb12u3?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2011--3389

Affected range>=3.7.9-2+deb12u3
Fixed versionNot Fixed
EPSS Score0.60%
EPSS Percentile79th percentile
Description

The SSL protocol, as used in certain configurations in Microsoft Windows and Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Opera, and other products, encrypts data by using CBC mode with chained initialization vectors, which allows man-in-the-middle attackers to obtain plaintext HTTP headers via a blockwise chosen-boundary attack (BCBA) on an HTTPS session, in conjunction with JavaScript code that uses (1) the HTML5 WebSocket API, (2) the Java URLConnection API, or (3) the Silverlight WebClient API, aka a "BEAST" attack.

critical: 0 high: 0 medium: 0 low: 1 gnupg2 2.2.40-1.1 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2022--3219

Affected range>=2.2.40-1.1
Fixed versionNot Fixed
EPSS Score0.05%
EPSS Percentile18th percentile
Description

GnuPG can be made to spin on a relatively small input by (for example) crafting a public key with thousands of signatures attached, compressed down to just a few KB.

critical: 0 high: 0 medium: 0 low: 1 apt 2.6.1 (deb)

pkg:deb/debian/[email protected]?os_distro=bookworm&os_name=debian&os_version=12

low : CVE--2011--3374

Affected range>=2.6.1
Fixed versionNot Fixed
EPSS Score0.16%
EPSS Percentile54th percentile
Description

It was found that apt-key in apt, all versions, do not correctly validate gpg keys with the master keyring, leading to a potential man-in-the-middle attack.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@robert-schardt
Copy link
Contributor Author

gssapi seems to be deprecated in openvas-smb:

#10 70.38 /source/samba/auth/credentials/credentials_krb5.c:316:20: error: implicit declaration of function 'gss_krb5_import_cred'; did you mean 'gss_import_cred'? [-Wimplicit-function-declaration]
#10 70.38   316 |         maj_stat = gss_krb5_import_cred(&min_stat, ccache->ccache, NULL, NULL,
#10 70.38       |                    ^~~~~~~~~~~~~~~~~~~~
#10 70.38       |                    gss_import_cred
#10 70.39 /source/samba/auth/credentials/credentials_krb5.c: In function 'cli_credentials_set_client_gss_creds':
#10 70.39 /source/samba/auth/credentials/credentials_krb5.c:367:20: error: implicit declaration of function 'gss_krb5_copy_ccache' [-Wimplicit-function-declaration]
#10 70.39   367 |         maj_stat = gss_krb5_copy_ccache(&min_stat,
#10 70.39       |                    ^~~~~~~~~~~~~~~~~~~~
#10 70.40 gmake[2]: *** [samba/CMakeFiles/samba-static.dir/build.make:1470: samba/CMakeFiles/samba-static.dir/auth/credentials/credentials_krb5.c.o] Error 1
#10 70.40 gmake[1]: *** [CMakeFiles/Makefile2:136: samba/CMakeFiles/samba-static.dir/all] Error 2
#10 70.40 gmake: *** [Makefile:156: all] Error 2
#10 ERROR: process "/bin/sh -c DESTDIR=/install cmake --build /build -- install" did not complete successfully: exit code: 2
------
> [build 5/5] RUN DESTDIR=/install cmake --build /build -- install:
70.38   316 |         maj_stat = gss_krb5_import_cred(&min_stat, ccache->ccache, NULL, NULL,
70.38       |                    ^~~~~~~~~~~~~~~~~~~~
70.38       |                    gss_import_cred
70.39 /source/samba/auth/credentials/credentials_krb5.c: In function 'cli_credentials_set_client_gss_creds':
70.39 /source/samba/auth/credentials/credentials_krb5.c:367:20: error: implicit declaration of function 'gss_krb5_copy_ccache' [-Wimplicit-function-declaration]
70.39   367 |         maj_stat = gss_krb5_copy_ccache(&min_stat,
70.39       |                    ^~~~~~~~~~~~~~~~~~~~
70.40 gmake[2]: *** [samba/CMakeFiles/samba-static.dir/build.make:1470: samba/CMakeFiles/samba-static.dir/auth/credentials/credentials_krb5.c.o] Error 1
70.40 gmake[1]: *** [CMakeFiles/Makefile2:136: samba/CMakeFiles/samba-static.dir/all] Error 2
70.40 gmake: *** [Makefile:156: all] Error 2

@nichtsfrei
Copy link
Member

Unfortunately we are unable to change to a newer gssapi within openvas-smb.

@robert-schardt
Copy link
Contributor Author

So, building the testing image fails also on the replaced workflow.
The cause must relate to building testing.

@y0urself
Copy link
Member

y0urself commented Oct 8, 2024

Unfortunately we are unable to change to a newer gssapi within openvas-smb.

What will happen if we change to a newer version?

@robert-schardt robert-schardt requested a review from a team October 22, 2024 08:12
@nichtsfrei
Copy link
Member

nichtsfrei commented Oct 28, 2024

Unfortunately we are unable to change to a newer gssapi within openvas-smb.

What will happen if we change to a newer version?

We don't know the side effects, it is an very old samba fork without any kind of knowledge and very specific complexity. We may can get through if there was no function changes between the versions, but runtime behavior: no clue.

That said we may can skip testing by saying in the moment testing gets stable openvas-smb must have been replaced by then. @ArnoStiefvater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants