Repository navigation
FILE-6430: fix blacklisted filesystems detection and modprobe paths - #1807
Open
rafaelsoje wants to merge 1 commit into
Open
rafaelsoje wants to merge 1 commit into
rafaelsoje wants to merge 1 commit into
Conversation
In include/tests_filesystems (test FILE-6430):
- Remove quotes around the glob in ${SUBDIR}/modprobe.d/* so the shell
correctly expands existing modprobe configuration files.
- Replace hardcoded ${ROOTDIR}etc/modprobe.d/* with ${SUBDIR}/modprobe.d/*
so both /etc/modprobe.d and /usr/lib/modprobe.d are checked for blacklists.
- Anchor lsmod match with trailing whitespace [[:space:]] to avoid
prefix false positives (e.g. hfsplus matching hfs).
- Add changelog entry under Lynis 3.1.8.
Closes CISOfy#1794
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes blacklisted filesystem detection and modprobe path evaluation in test
FILE-6430.Closes #1794
Details
include/tests_filesystems:"${SUBDIR}/modprobe.d/*"(line 887). The quotes prevented shell globbing, causinglsto search for a literal asterisk*and fail, leavingFINDempty on directories with files.${ROOTDIR}etc/modprobe.d/*with${SUBDIR}/modprobe.d/*and add-sso both/etc/modprobe.dand/usr/lib/modprobe.dare properly searched.lsmodwith a trailing space/whitespace delimiter (^${FS}[[:space:]]) to prevent prefix matches (e.g.hfsplusmatchinghfs).CHANGELOG.md:## Lynis 3.1.8 (not released yet)->### Changed.Verification
FILE-6430via./lynis audit system --tests FILE-6430 --cronjob:bash -n include/tests_filesystemsandsh -n include/tests_filesystems.