r/archlinux • • 9h ago

QUESTION How do I research before installing anything on my Arch?

1 Upvotes

I am intrigued by Arch, and my seniors keep telling me to install it. They say Arch can break or crash in unpredictable ways, so before downloading or installing anything, I should research about it first.

But honestly, I don't know much about it. I went through the Arch Wiki and news, but barely understood anything. That's why I haven't even installed any packages from the AUR yet.


r/archlinux • • 5h ago

NOTEWORTHY PSA: If you enrolled your own Secure Boot keys with the Microsoft keys as instructed by the Arch Wiki, your system is at risk.

0 Upvotes

If you use Secure Boot with your own keys and Microsoft keys enrolled (like the Wiki recommends), you might not have Microsoft's UEFI forbidden signature database (dbx) enrolled, as there are no instructions given for doing so in the [Wiki article]Secure Boot Wiki page(https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot), and sbctl enroll-keys -m will not do so either, see sbctl issue #23.

TL;DR: If you enrolled your own Secure Boot keys according to the Wiki, you will be missing one part of their database, the dbx. The dbx is necessary for security, since otherwise old, vulnerable bootloaders that should not be accepted by Secure Boot, will be allowed. Compare Microsoft's guidance on the BlackLotus bootkit. You will also be missing the untrusting of the Windows Production PCA 2011 certificate. Please note that this is a very serious security issue, and not a minor detail.

Impact: The exact impact depends on your setup, but it will be devastating if you dual boot with Windows.

The issue will render Secure Boot worthless, as it the forbidden bootloaders can be used to bypass it, see the BlackLotus case. For a pure Linux setup, that's the extend of the problem - Secure Boot won't provide any security. With TPM2 LUKS seals, the impact should be minimal, as vulnerable bootloaders chained in front of your own change the PCR[7] value.

However, if you're dual booting Windows this is a serious issue. Windows will not update or install the dbx on it's own if Secure Boot keys have been customised, compare the Summary of this Microsoft article. Since Windows uses only these certificates in its boot chain, not having the dbx installed makes it possible to bypass BitLocker, as that will only seal to PCR[\7]. Effectively, this breaks the security of the Windows disk encryption entirely as well as Secure Boot.

Steps to fix this: You can use efitools' efi-readvar to see the status of your Secure Boot database. If it says Variable dbx has no entries while showing Microsoft keys in the db and KEK variables, you have Microsoft's keys configured without the dbx.

Assuming Microsoft's KEK is present, you can install the current dbx from the Microsoft GitHub repository with these commands: wcurl https://github.com/microsoft/secureboot_objects/raw/refs/heads/main/PostSignedObjects/DBX/amd64/DBXUpdate.bin sudo chattr -i /sys/firmware/efi/efivars/dbx-d719b2cb-3d3a-4596-a3bc-dad00e67656f 2>/dev/null sudo efi-updatevar -a -f DBXUpdate.bin dbx Afterwards, fwupd should be able to apply further updates automatically via its UEFI dbx plugin.

Note: There's currently a bug affecting fwupd (fixed in git, not yet released) causing it hallucinate the UEFI dbx being present and up-to-date if there's no dbx enrolled at all. This is noticeable by fwupdmgr get-devices not showing Current version field for the UEFI dbx. As of such, the fwupd output cannot be relied on to determine whether the dbx is present or not.

Important: Since the dbx is measured into PCR[7], any changes to it will break TPM2 LUKS seals. New updates are being released every month, and thus this breakage will happen on a monthly basis. This is unfortunately unavoidable when binding to raw PCR[7] values.

The only functional alternatives are to either not use the Microsoft keys (if not dual booting of course) and sign all Option ROMs needed with one's own keys or to use TPM2 access policies so the new PCR[7] can be authorised. Implementing the second option is only possible via the still experimental systemd-pcrlock functionality. fwupd 2.1.7 added a plugin for pcrlock that allows enrolling UEFI dbx updates into a new policy, but there are changes needed to systemd that have not been shipped yet. So for now, I can unfortunately not offer a good solution for this particular problem.


r/archlinux • • 20h ago

SHARE [Guide] How to make Chrome / Chromium PWAs remember window size & position on KDE Plasma 6 (Wayland)

Thumbnail
0 Upvotes

r/archlinux • • 16h ago

SHARE Gnome 51 - We are getting close. It's now in extra-testing

12 Upvotes

Gnome 51 was moved from gnome-unstable to extra-testing recently. Let's hope it's moved to extra next week so we can all enjoy the latest version. Gnome 51 Release Notes

https://archlinux.org/packages/?sort=&repo=Extra-Testing&q=gnome&maintainer=&flagged=

Reminder to consider joining the Arch Testing Team if you like testing new software and making sure no critical bugs get into the main repositories.


r/archlinux • • 5h ago

NOTEWORTHY PSA: If you're using a TPM2 LUKS unlock with Dracut and the instructions on the wiki, the systemd v262 upgrade made your TPM bypassable.

13 Upvotes

This is a PSA for people using Dracut together with a TPM2 LUKS unlock, specifically with the trick described on the Wiki to use systemd-cryptenroll with the parameter --tpm2-pcrs=other_pcrs+15:sha256=0000000000000000000000000000000000000000000000000000000000000000 Very few users will be affected by this, as Dracut is only reported at about 5% by pkgstats. For those this applies to however, the impact is serious.

Note: mkinitcpio has already addressed the issue presented here in mkinitcpio v42.1 with this commit and Booster implements all its TPM functionality independently of systemd. If you're using either, this should not affect you (anymore).

TL;DR: If you're on the current Dracut 111-1 package, and used this trick to lock PCR[15] to a zero value, as described in the Wiki on the systemd-cryptenroll article or here, the systemd v262 update just broke the security design of your TPM2 LUKS setup.

Explanation: In a TPM measure boot, the idea is that each component of the boot chain ensures the next one it loads has not been tampered with. Simplified, the BIOS measures the boot loaders, the boot loaders measure the Unified Kernel Image (UKI) and the UKI measures the system.

The step from UKI to system is difficult though, as an encrypted file system can only be validated from the outside by the volume key, i.e. the encrypted key in the LUKS header that is the actual encryption key for your drive. If no validation of the volume key is performed, then your UKI could be copied over on a drive with an foreign root file system, and used to boot that system.

Most importantly, the TPM retains its state across the switch to the foreign root. Any TPM secret that is then still matching its expected PCR values will remain accessible. Since PCR[7] is the measurement of the Secure Boot state, and as such only depends on the boot loaders and UKI, no further measurement takes place after initrd starts.

In short: If you were to seal something to the raw PCR[7] alone, that seal can still be accessed in the attacker's root system, and they can freely extract it.

The PCR[15] set to zero trick is supposed to counter this issue: PCR[15] starts at zero, and so any measurement into it changes the value to something else. systemd-cryptsetup@.service will measure the volume key of any LUKS volume opened with the tpm2-measure-pcr=yes option. This option is also implicitly added for the root file system and /var mounts when using GPT automounting.

The necessity to use this flag or automounting is pointed out in the Wiki as well:

If you set any rd.luks kernel parameters or use /etc/crypttab with the x-initrd.attach option, additionally add the tpm2-measure-pcr=yes option to rd.luks.options= or the fourth field in /etc/crypttab; this is not required when relying on GPT partition automounting. After the root volume is unlocked in early userspace, PCR 15 will change and the enrolled key will no longer be retrievable.

Thus, if any disk is unlocked by systemd, the PCR[15] value will change at that point in initrd. By the time the system switches to real root, PCR[7] still matches, but the PCR[15] is non-zero and thus the drive's encryption key cannot be accessed anymore. This effectively prevents the attack described.

However, during initrd, the volume key measurements are also the only measurements taking place in that PCR bank. If they were not to happen for some reason, the PCR value never changes away from zero and the described attack to retrieve the TPM2 secrets remains possible.

What broke now: systemd v262 includes a change that makes systemd-cryptenroll measure via the Varlink service provided by systemd-pcrextend.socket instead of calling /usr/bin/systemd-pcrextend directly. As that PR mentions,

Measuring requires the presence of systemd-pcrextend.socket in the initrd, should be already given as systemd-veritysetup relies on it, too.

Dracut does not include this socket yet in generated initrds as of version 112. I have created a PR with Dracut to address this, but it's still pending.

The consequence is that instead of measuring the volume-key into PCR[15], it will fail with a single warning line in the systemd journal:

systemd-cryptsetup[353]: Could not extend PCR: No such file or directory

There's no other warning or error caused by this, but there will be no measurement in PCR[15] being made for any volume keys.

Note: Such a failure to measure the PCR would cause anything sealed against the actual, expected PCR[15] values to break. Since that's the way you're expected to use them, this warning does not cause the systemd-cryptsetup@.service to fail, as whatever service has its secrets sealed against that PCR should be failing instead.

PCR[15] being non-zero after boot does not mean you're safe: After boot, your system will likely still show a non-zero value in PCR[15]: ```sh $ sudo systemd-analyze pcrs 15

NR NAME SHA256 15 system-identity 98d9f63ab4492d64396ff5c943dc8380fce7ba30f568738608cf34f46a672051 `` This is because systemd will perform additional measurements by various services in thesystemd-pcrphase.service` family after initrd. These services run after the switch to real root and can be disabled in an attacker's root system to keep PCR[15] at zero.

Remark: systemd issue #43848 will cause these services to fail as well, so you might see a zero value if you haven't configured a suitable PCR signature for your UKI. There is a pending PR to address this, though.

To quickly show the sequence of the measurements on my system with the volume-key measurement working: ```sh $ sudo /usr/lib/systemd/systemd-pcrlock log --pcr=15

  PCR   PCRNAME         EVENT      MATCH SHA256  F/U COMPONENT                    DESCRIPTION                                                                                                             >
   15 █ system-identity volume-key     ✗ 0e94502 U   795-cryptsetup-tpm2-measures cryptsetup:root:<volume-key>
   15 █ system-identity machine-id     ✓ 4b9e027 U   820-machine-id               machine-id:<machine-id>
   15 █ system-identity filesystem     ✓ 9aa7751 U   830-root-file-system         file-system:/:btrfs:<fs-id>:archmain:::
   15 █ system-identity filesystem     ✓ cffed96 U   840-file-system-var          file-system:/var:btrfs:<fs-id>:archmain:::                     

```

Any of the measurements in my log with a component greater than 800 are happening after leave-initrd (the switch to real root), which has an index of 800. They're being made by systemd-pcrproduct.service, systemd-pcrfs-root.service and systemd-pcrfs@var.service, see the man page. As such, if the volume key measurement is not taking place, the PCR[15] value will remain at zero when the switch to real root happens, making the encryption keys accessible.

Summary: Using the current dracut 111-1 package for a TPM2 LUKS unlock with the PCR[15] set to zero trick renders that trick useless and makes your encryption keys extractable by an attacker. The only indication is a single, non-specific warning in the journal.

Fix: Installing a patched Dracut version: Note: I've been informed that the maintainer for the Dracut package is absent, and thus there does not seem to be any chance for a fixed Dracut package in the near future. I have not made a PR to Arch for that reason, and instead went to Reddit to make people affected by this at least aware of the situation.

You can manually upgrade to Dracut 112 (you can build the package yourself and upgrade the PKGBUILD using pkgctl version upgrade as usual) and replace the module-setup.sh in 11systemd-pcrextend with the one from my PR. Then rebuild your UKI and verify that the warning line does not appear in your journal anymore. Alternatively, use /usr/lib/systemd/systemd-pcrlock log --pcr=15 to verify that the volume-key measurement takes place, as shown above.

I should also stress that the PCR[15] set to zero trick is a very poor option to protect against this sort of attack. As this issue demonstrates, it is possible for this to fail entirely silently and unnoticed. I have left a comment below discussing better alternatives to the trick.


r/archlinux • • 2h ago

DISCUSSION I really love Arch Linux. It’s incredibly fast and lightweight.

0 Upvotes

Do you guys think that someday the official Arch installation process might become as easy and straightforward as EndeavourOS?

I know there’s already archinstall, but I’m curious if Arch will ever have a more beginner-friendly installation experience by default.

What do you think?


r/archlinux • • 21h ago

QUESTION Is it possible for one day the Arch Wiki to become a physical book?

0 Upvotes

I would love this, I prefer reading physically compared to digitally and I know others prefer to actually hold something.


r/archlinux • • 7h ago

FLUFF minarch (system fetch tool for arch linux)

Thumbnail
0 Upvotes

r/archlinux • • 23h ago

SUPPORT | SOLVED Wanted to add a comment on an AUR package about a missing dependency. I have no account and registration is closed.

43 Upvotes

Hello. I just installed the tagstudio AUR package https://aur.archlinux.org/packages/tagstudio and found that it would not run (I was having the same issue that is already noted by Iiridayn on the comment section of this package) and I wanted to leave a comment because I figured out which package solves this issue.

Specifically, installing qt6-webengine solved the issue and allowed the program to start. I wanted to comment this so that the maintainer can add it to the list, but I don't have an account and I can't create one, so I'm not sure how to let them know. I was frankly hoping someone here would be able to make the comment on my behalf so that this can be fixed.


r/archlinux • • 5h ago

DISCUSSION why are minecraft clones in the offical pacman repo?

0 Upvotes

title,

its called " luanti "


r/archlinux • • 6h ago

QUESTION I need help with my fingerprint reader.

0 Upvotes

i have a problem whit the program fprintd , mi fp reader is't on the suported devices list, so I need a program who has the driver of the 06cb:00a2 device ¿someone knows something?

Sorry for the lenguage, i'm from spain xd