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

[HRDN-7222] When checking permissions, permissions of symlinks are checked instead of the binary file (compilers) #1514

Open
dubalda opened this issue Jun 21, 2024 · 0 comments

Comments

@dubalda
Copy link

dubalda commented Jun 21, 2024

Describe the bug
When checking permissions, permissions of symlinks are checked instead of the binary file (compilers)

Version

  • Ubuntu 22.04
  • Lynis version 3.1.1

Expected behavior
Permissions to the file (compiler executable file) to which the symlink points must be checked. Instead, the symlink's permissions are checked (which always have maximum permissions)

Output

grep compiler /var/log/lynis.log
2024-06-21 19:02:30   Found known binary: as (compiler) - /usr/bin/as
2024-06-21 19:02:59 Performing test ID HRDN-7220 (Check if one or more compilers are installed)
2024-06-21 19:02:59 Test: Check if one or more compilers can be found on the system
2024-06-21 19:02:59 Result: found installed compiler. See top of logfile which compilers have been found or use /usr/bin/grep to filter on 'compiler'
2024-06-21 19:02:59 Performing test ID HRDN-7222 (Check compiler permissions)
2024-06-21 19:02:59 Test: Check if one or more compilers can be found on the system
ls -l  /usr/bin/as
lrwxrwxrwx 1 root root 28 Jun 21 17:35 /usr/bin/as -> /usr/bin/x86_64-linux-gnu-as
ls -l /usr/bin/x86_64-linux-gnu-as
-r-x------ 1 root root 696624 Jan 23 10:47 /usr/bin/x86_64-linux-gnu-as

Additional context
Symlink found /usr/bin/as
The permissions on the symlink were checked and an error was returned.

But in fact the symlink points to the compiler /usr/bin/x86_64-linux-gnu-as , which has the correct permissions

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

No branches or pull requests

1 participant