Securing the Linux kernel with lockdown mode
Additional Safeguards
If you want to use lockdown mode, you need to monitor a few additional factors when operating your environment. After all, lockdown and any other security feature will not help if an attacker can disable them without being noticed.
Lockdown mode cannot prevent every possible security issue – for example, an admin can change certain files on the system. It is possible that a bad guy could quickly reconfigure GRUB to prevent lockdown mode from being activated in the first place.
Regular Checks
Discovering whether lockdown mode is still active is most easily done at the command line. During monitoring, you will want to check whether the lockdown
parameter is defined in the /proc/cmdline
file and whether it has a value of confidentiality
or integrity
. The LSM lockdown
module also needs to appear in the kernel command line, otherwise the lockdown
parameter has no effect.
Even without a lockdown mode in the kernel, all the alarms should go off if a system reboots unexpectedly. Most of the time, a sudden reboot is due to a broken hardware device or driver. But you need clarity about the root cause quickly. The problem could also be an attacker rebooting the system after changing the boot loader configuration. For this reason, I would recommend monitoring a few additional files of system config for example, /boot/grub/grub.cfg
.
Do Not Feel Too Secure
Every admin should also be clear that absolute security does not exist. State-financed hackers usually spare no effort and are therefore capable of carrying out highly complex attacks. In fact, an attacker could simply overwrite the boot loader and use their own configuration file so that the grub.cfg
stored on the system is not changed. You would only find out about this by checking if the currently running kernel is the one delivered by the manufacturer. If you want to secure your system against such attacks, you have a great deal of work to do. Lockdown mode in the Linux kernel is certainly not a carte blanche that lets you put your feet up and stop worrying about security.
This raises the question as to whether there are also things that Linux kernel lockdown mode does not protect systems against. The answer to this question is a resounding yes.
For example, lockdown does nothing at all to protect you against hardware-related errors. Prominent examples of hardware-based security flaws include the Spectre and Meltdown attacks that caused alarm throughout the Linux community a couple years ago. Although Spectre and Meltdown are now rendered harmless by other kernel workarounds, lockdown mode would not have been able to offer any protection against these bugs.
Similarly, the Linux kernel itself has unnoticed bugs that bypass lockdown mode. This was the case in June 2020, for example, when a bug in the ACPI code allowed kernel code to be smuggled past the UEFI Secure boot interface – and also past the lockdown module.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.
-
CachyOS Adds Support for System76's COSMIC Desktop
The August 2024 release of CachyOS includes support for the COSMIC desktop as well as some important bits for video.
-
Linux Foundation Adopts OMI to Foster Ethical LLMs
The Open Model Initiative hopes to create community LLMs that rival proprietary models but avoid restrictive licensing that limits usage.
-
Ubuntu 24.10 to Include the Latest Linux Kernel
Ubuntu users have grown accustomed to their favorite distribution shipping with a kernel that's not quite as up-to-date as other distros but that changes with 24.10.
-
Plasma Desktop 6.1.4 Release Includes Improvements and Bug Fixes
The latest release from the KDE team improves the KWin window and composite managers and plenty of fixes.
-
Manjaro Team Tests Immutable Version of its Arch-Based Distribution
If you're a fan of immutable operating systems, you'll be thrilled to know that the Manjaro team is working on an immutable spin that is now available for testing.