Not happy with the realtek cards being broken, though. But at least I’ll added these to the wiki so this becomes at least possible to figure out using “google”.
^ There is now a merge conflict.
^ Could you please document the devices similar to the ones already documented at hardened-kernel?
@Patrick can you maintain the versioning from now on? Updates are frequent and it can take a while for me to update the versions, create a pull request and then for it to get merged which leaves users on an outdated kernel for a while.
You just need to change the version variable in the build script and update the config (there likely won’t be much change due to us using LTS). You can be notified of new releases by watching the linux-hardened repo: Watchers · anthraxx/linux-hardened · GitHub
kconfig-hardened-check and the KSPP recommended kernel settings have both been recently updated but there isn’t anything relevant to us (as we’ve already done them, they aren’t in our version or they’re for clang).
I am not comfortable with hardened-kernel yet. I can’t give it as much time as it deserves. It’s still not having the maturity that I’ve set as a goal before recommending it to users of Whonix / Kicksecure. (Comparable to other Whonix packages.) See project status (written just today): hardened-kernel
None of the technical issues are not too hard to solve. Underlying issue are non-technical, lack of time and no current scaling issues of the Whonix project.
If I’m understanding this right, we can make the build script create ${working_folder}/packages, then move all the .debs there after compilation:
packages_folder="${working_folder}/packages"
if ! [ -d "${packages_folder}" ]; then
mkdir "${packages_folder}"
fi
mv "${extracted_linux_kernel_sources_folder}/../linux-libc-dev_${version}-rt24-1_amd64.deb" "${packages_folder}/${kernel_config}-libc.deb"
mv "${extracted_linux_kernel_sources_folder}/../linux-headers-${version}-rt24_${version}-rt24-1_amd64.deb" "${packages_folder}/${kernel_config}-headers.deb"
mv "${extracted_linux_kernel_sources_folder}/../linux-image-${version}-rt24_${version}-rt24-1_amd64.deb" "${packages_folder}/${kernel_config}.deb"
/etc/apt/sources.list.d/hardened-kernel-local.list would then contain:
deb [trusted=yes] file:/var/lib/hardened-kernel/hardened-vm-kernel/packages local main contrib non-free
deb [trusted=yes] file:/var/lib/hardened-kernel/hardened-host-kernel/packages local main contrib non-free
We then run apt update and install the kernel image via apt install? e.g.
Yes but that folder cannot just contain packages as far as I know. It needs to be in a file structure that apt understands. I.e. APT repository metadata. To be created with reprepro.
Not sure this was thought or intended to say, just mentioning in case: by changing the filename such as linux-image-${version}-rt24_${version}-rt24-1_amd64.deb to hardened-vm-kernel.deb actually nothing happens. apt does “not much” use the file name for anything. The name of the package is derived from the Debian package metadata (/debian folder).
Getting apt to act on sudo apt install hardened-vm-kernel requries the Debian package metadata to use Package: hardened-vm-kernel somewhere. I don’t know yet how the Debian packaging of linux kernel works yet. Usually for packages (from packages.debian.org) other than linux there is a /debian folder in the source code repository that contains all Debian packaging related files. In case of the linux kernel it seems like that make deb-pkg somehow auto generates that /debian folder during the build process. I wouldn’t know the best approach yet.
Perhaps build the kernel image without using make deb-pkg and then use a /debian folder based on Debian’s Debian kernel team / linux · GitLab/debian folder (I speculate that one is better), or
Hack the environment variables / autogeneration code of Linux’s upstream make deb-pkg. (I speculate this way is worse.)
That auto generated /debian folder may or may not differ from the /debian folder for linux-image from packages.debian.org.
For educational / development / debugging purposes I’d suggest to experiment with packaging something easy first such as the hello package. Building that package from source. Maybe adding that package to a local APT repository. Other “easily” packaged packages might be genmkfile, helper-scripts, kloak, lkrg. (The software itself might be complex but the packaging process wasn’t the most hard level.)
Can’t we just unpack the deb, edit it, then re-pack it?
e.g.:
ar x "${packages_folder}/${kernel_config}.deb"
tar xf "${packages_folder}/control.tar.xz"
str_replace "..." "..." "${packages_folder}/control"
tar cf ... ...
ar m ... ...
I think it might be a good idea to create a large post detailing all of our recent security hardening work including security-misc, apparmor-profile-everything, hardened-kernel, sandbox-app-launcher, hardened_malloc, LKRG and tirdad and the issues they aim to fix, similar to The Problem with Security Guides and How We Can Fix It. It could have the potential to attract a lot of new people as it’s not just kernel stuff but also MAC, sandboxing, memory allocators etc.
I could write something up if you’re interested. A good title may be something like “Fixing the Desktop Linux Security Model”.
I guess both ([number] style + forum links) would be good to - because then this can be re-posted on mailing lists.
tirdad is a kernel module that aims to prevent TCP Initial Sequence Number (ISN) based information leaks by randomizing the TCP ISNs [6]. This is more of anonymity feature than a security feature.
Whonix is a security, privacy and anonymity focused Linux distribution. Recently, we’ve been focusing a lot on important security hardening measures and fixing architectural security issues within the desktop Linux security model.
Could you please make more clear that any desktop Linux distribution is affected?
Most are part of security-misc so there’s not much reason to mention them separately. I extended the security misc section a bit and added your suggestions Debian paste error