News for hackers. Stuff that matters.
Re:Linux and TPMs with systemd measured boot [video] by harvie on Sunday November 05, 2023 @06:26AM (#38150170)
TPM chips are not opensource, end user cannot simply check them for backdoors. Manufacturers of these chips are under heavy scrutiny of intelligence agencies. Governments around the world try their best to prevent people from using strong cryptography (eg. limiting effective key lengths in various ways).

Why should we trust such chips more than purely software based approach?

Re:Linux and TPMs with systemd measured boot [video] by isilofi on Sunday November 05, 2023 @06:31AM (#38150198)
We shouldn't. TPM-based security is only sufficient against unsophisticated attackers such as a common thief stealing your laptop from your backpack.
Re:Linux and TPMs with systemd measured boot [video] by jon-wood on Sunday November 05, 2023 @06:53AM (#38150348)
This is a massive overstatement of the situation. Sure, a TPM might not protect you against the NSA or the Chinese government stealing your computer. If configured correctly it probably will protect you against anything less than a major nation state stealing your computer.
Re:Linux and TPMs with systemd measured boot [video] by justaj on Sunday November 05, 2023 @07:21AM (#38150504)
But wouldn't a properly configured LUKS encryption protect against nation-state threats too? If so, then why still use TPM?
Re:Linux and TPMs with systemd measured boot [video] by alufers on Sunday November 05, 2023 @07:38AM (#38150621)
Convenience, faster boot. Or if you have a headless server with disk encryption, but you want it to come back online without intervention after a reboot or power failure.

It's all trade-offs.

Re:Linux and TPMs with systemd measured boot [video] by SV_BubbleTime on Sunday November 05, 2023 @09:25AM (#38151379)
In the scenario of headless, if I’m not missing something this only prevents drives from walking off. If the whole machine walks off you are in just as much trouble as not being encrypted at all if you don’t really trust your OS permissions systems?
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @09:40AM (#38151505)
The whole machine walking off is more detectable though. You can use TPM as one factor (among many, such as the presence of the machine on the expected network and no unexpected downtimes) to obtain storage keys from a separate trusted server, using TPM remote attestation to assert the machine hasn't been tampered with in-place (by merely booting it off a compromised OS).
Re:Linux and TPMs with systemd measured boot [video] by Asmod4n on Sunday November 05, 2023 @10:03AM (#38151697)
When someone steals your device and try’s to guess a user password a tpm can just throw away it's keys. (Or something similar)

Try it on a secure boot and tpm2 enabled Bitlocker encrypted drive, the only way to get in is via the recovery key after a configurable number of attempts.

Re:Linux and TPMs with systemd measured boot [video] by alufers on Sunday November 05, 2023 @10:08AM (#38151752)
If you take some basic precautions - disable interrupting the boot process, serial console, etc. then bypassing that requires significant effort. As an attacker you need to know the versions of the software working on the server, know some exploit and then have the experise to use it.

For example I know that the police in my country use off the shelf disk cloning devices and then some basic forensics software for analyzing the disk image. This can be done by an average computer technician, and such a TPM scheme would totally prevent them from extracting data. Of course for bigger cases they can invest some more effort, but they would have to be sure that there is some important data there to justify the cost.

Re:Linux and TPMs with systemd measured boot [video] by LtWorf on Sunday November 05, 2023 @12:32PM (#38153344)
Basically "the client requested it without understanding it makes no sense, so we did this thing"
Re:Linux and TPMs with systemd measured boot [video] by lostmsu on Sunday November 05, 2023 @07:36AM (#38150611)
If machine is not attached to a terminal it is useful if it boots on its own.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @10:58AM (#38152236)
Then it still boots on its own if the bad guy has it.
Re:Linux and TPMs with systemd measured boot [video] by izacus on Sunday November 05, 2023 @11:05AM (#38152314)
And that's fine, it'll boot to macOS/Linux/Windows login screen and that's it.
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @07:29PM (#38157317)
Also, if it's able to phone home in this state, it can be managed remotely including remote erase (whether of the storage drive or the TPM keys) if needed.
Re:Linux and TPMs with systemd measured boot [video] by jon-wood on Sunday November 05, 2023 @07:59AM (#38150757)
TPM based encryption is hugely useful in embedded devices, where you really don’t want to have to despatch someone to type the passphrase in. By driving it via the TPM you’re protected against someone removing the storage and being able to read the decryption key off it, and you’re also protected against someone modifying the components required to get to a decrypted disk to inject code you weren’t expecting - if the kernel or bootloader is modified then the device simply won’t boot.
Re:Linux and TPMs with systemd measured boot [video] by pmontra on Sunday November 05, 2023 @08:24AM (#38150921)
With an embedded device isn't easier to just steal the device instead of only the storage and making the device useless anyway?
Re:Linux and TPMs with systemd measured boot [video] by bmicraft on Sunday November 05, 2023 @08:36AM (#38151002)
In this scenario protecting the secrets on the device is supposedly more important that the monetary value of the device itself.
Re:Linux and TPMs with systemd measured boot [video] by SV_BubbleTime on Sunday November 05, 2023 @09:24AM (#38151363)
I sell a device. There are lots of them in hands. You still aren’t getting my device key off of it. Yes, you can use that device all you like, but you aren’t going to clone it and make more.
Re:Linux and TPMs with systemd measured boot [video] by sillystuff on Sunday November 05, 2023 @10:36AM (#38152018)
You've described DRM; this is exactly why a lot of people are wary of TPMs.
Re:Linux and TPMs with systemd measured boot [video] by lxgr on Sunday November 05, 2023 @11:35AM (#38152658)
No, DRM is safeguarding other people's keys on your device.

There's more applications of trusted computing and TPMs than that; one of them is using it to safeguard your own keys.

Re:Linux and TPMs with systemd measured boot [video] by sillystuff on Sunday November 05, 2023 @11:42AM (#38152738)
> DRM is safeguarding other people's keys on your device.

I think you misread the GP. Your definition of DRM is exactly what GP described as his use of the TPM.

>>I sell a device. There are lots of them in hands. You still aren’t getting my device key off of it. Yes, you can use that device all you like, but you aren’t going to clone it and make more.

What the GP describes is not safeguarding the nominal owner of the devices' keys. GP is restricting the nominal owner of the device on behalf of himself as the manufacturer. This is leveraging the TPM for DRM.

Other possible less nefarious uses of the TPM are irrelevant to this point.

Re:Linux and TPMs with systemd measured boot [video] by lxgr on Sunday November 05, 2023 @11:52AM (#38152863)
Oh, I indeed read that as "I [re]sell a device". In the case of them selling devices with embedded non-extractable keys, it could really be DRM.

Or something else! Payment cards work like that – they hold keys that nobody is supposed to be able to duplicate; certainly not third-parties, but also not the legitimate account-/cardholder.

There are plenty of uses for trusted computing other than DRM; they're just usually not as disruptive/frustrating to legitimate customers as DRM (and as a result are not as contentious), so they don't get as much attention.

Re:Linux and TPMs with systemd measured boot [video] by zlg_codes on Sunday November 05, 2023 @11:19PM (#38158811)
What moral right do they have to put data on devices you own?

TPMs jeopardize the ownership of a device. Consumer devices are already sold where you can't (easily) inspect or change anything.

Even a user-controlled TPM can be used as storage for keys used to usurp control of the device. The existence of IME and PSP enables manufacturers to have more control over computing devices than the people who buy and operate them.

There is no moral defense for sabotaging ownership.

Re:Linux and TPMs with systemd measured boot [video] by jon-wood on Monday November 06, 2023 @05:06AM (#38160658)
I genuinely wish things were this binary. I’m a hacker (using the original definition) at heart, I want to turn random devices I own into other things, which would be so much easier if it weren’t for encrypted storage and signed boot chains.

That’s all very well until you start talking about hardware that does things like providing video of the inside of someone’s home. I’m still behind being able to modify them and use them as you please, but if you do so that should be self-evident, because otherwise *someone else* can do so, and you won’t know until video appears on the internet if you walking back from the shower.

TPMs don’t necessarily mean that you can’t modify a device you’ve bought, it just means that things like the API key which connected it to the backend will be invalidated and you’ll have to set the device up some other way. That’s a safety mechanism, and even I want it to be present in hardware I buy.

Likewise I don’t want someone to be able to take a doorbell from the front of my house, extract my wifi credentials from it, and pivot from that to compromising the entire network.

I’m sure some people will say “well just don’t have those things”, and I’m inclined to agree, despite having worked on such devices I’m not sure they’re actually hugely useful to most people. People are buying them though, they’re in the wild, let’s make them as secure as possible.

Re:Linux and TPMs with systemd measured boot [video] by patrakov on Monday November 06, 2023 @04:10AM (#38160310)
Let me reply item-by-item.

> No, DRM is safeguarding other people's keys on your device.

Correct - in this case, safeguarding mainly means making sure that the nominal owner of the device does not extract the keys.

> There's more applications of trusted computing and TPMs than that

Correct

> one of them is using it to safeguard your own keys.

Questionable - needs a definition of safeguarding. Making sure that the keys cannot be backed up would be a strange definition.

Re:Linux and TPMs with systemd measured boot [video] by matheusmoreira on Sunday November 05, 2023 @09:04PM (#38157948)
It's all about who owns the keys. If we own the keys, the technology empowers us. If they own the keys, the technology oppresses us.
Re:Linux and TPMs with systemd measured boot [video] by jon-wood on Sunday November 05, 2023 @09:29AM (#38151421)
At least the embedded devices I work on don’t expose any (reasonable) method to persuade them to do anything other than their intended job, so sure, steal the device if you like. With enough effort you can probably turn it into a general purpose computer, but you’re not getting any of the secrets off it.
Re:Linux and TPMs with systemd measured boot [video] by cyberax on Sunday November 05, 2023 @09:43AM (#38151545)
Yes, but you'll need to enter a long password on every boot.
Re:Linux and TPMs with systemd measured boot [video] by goodpoint on Sunday November 05, 2023 @09:23AM (#38151357)
No, it's worse. It's *making* you vulnerable to those actors and possibly more.
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @09:27AM (#38151396)
The majority of people don't want to type a long passphrase every boot (or would pick a trivially-bruteforceable one) and FDE-backed TPM (even if vulnerable to state-sponsored attacks) is better than what it would otherwise be which is no FDE at all.
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:42AM (#38152741)
Eh no that's not true. If a device uses a discrete TPM and isn't using authenticated sessions it's trivial to sniff the bus and extract the encryption key. If it is then it's less trivial because you need to interpose the TPM but that's still in "Can solder SMT parts" territory, not major nation state.
Re:Linux and TPMs with systemd measured boot [video] by Bognar on Sunday November 05, 2023 @01:47PM (#38154230)
You can only extract the encryption key if using the unencrypted APIs. You can establish and require an encrypted channel with the TPM if you know which TPM you are expecting.
Re:Linux and TPMs with systemd measured boot [video] by goodpoint on Sunday November 05, 2023 @09:21AM (#38151346)
Not even that.
Re:Linux and TPMs with systemd measured boot [video] by mratsim on Sunday November 05, 2023 @06:50AM (#38150329)
The real question is

"What's your threat model?"

If it's people stealing your laptop and fear of identity theft, use the TPM.

If it's the NSA, ¯\_(ツ)_/¯

Re:Linux and TPMs with systemd measured boot [video] by cobertos on Sunday November 05, 2023 @08:03AM (#38150788)
LUKS or eCryptfs work perfectly fine for the "stealing your laptop" use case, and are purely software implementations.

There's a poster below that provides a more reasonable use case for TPM. Headless server where asking for password on boot is undesirable (eg after a power failure)

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @09:24AM (#38151372)
Only problem of software implementations is that they are reliant on the strength of the user-supplied passphrase, so there's a inverse correlation between user experience (ease of typing the passphrase) and security (easy passphrases are also easy to bruteforce).

A TPM provides hardware-backed bruteforce protection which means even an easy passphrase can be made secure as the number of attempts is rate-limited by the TPM (to a level much slower than even the hardest hashes).

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @10:57AM (#38152229)
Then you want your own optional TPM that you trust - such as a YubiKey.
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:33AM (#38152634)
Why is a Yubikey more trustworthy? You don't have the source code, you don't have the hardware design. In addition, a Yubikey is given no information about the system boot state, so is in no position to identify that the system has been tampered with.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @11:56AM (#38152909)
It's just one example. Use a different one if you want.

People tend to trust them more because they belong to them, not Microsoft, or Hollywood, or the board manufacturer.

Re:Linux and TPMs with systemd measured boot [video] by mkopec on Sunday November 05, 2023 @03:33PM (#38155369)
In what manner specifically does a TPM not belong to the user, while a YubiKey does?
Re:Linux and TPMs with systemd measured boot [video] by immibis on Monday November 06, 2023 @09:34AM (#38163111)
Yubikey gets paid by people who want to do security things. Board manufacturers get paid, indirectly, by Microsoft allowing their boards to run Windows. The incentives are different.
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @12:37PM (#38153381)
The advantage of a TPM embedded in the platform is that it is aware of the platform's state - the hashes of the firmware, option ROMs and the bootloader/UEFI binary that you're loading. Discrete TPMs are vulnerable to bus interception attacks but newer firmware TPMs are embedded in the CPU/SoC and are invulnerable to this so it's pretty secure.

A YubiKey/external TPM in comparison has no way to know whether it's being fed true PCR readings from the host or fakes from a malicious attacker.

Re:Linux and TPMs with systemd measured boot [video] by LikesPwsh on Sunday November 05, 2023 @08:16AM (#38150861)
Like most ordinary folks, my threat model is the use of TPM for DRM.

Netflix playing at lower resolution for example.

Widespread TPM is actively harmful for most people, and the biggest blow to general purpose computing in recent years.

Re:Linux and TPMs with systemd measured boot [video] by dist-epoch on Sunday November 05, 2023 @09:13AM (#38151271)
> Netflix playing at lower resolution for example.

Nobody is forcing you to use Netflix. If you don't like it, leave for a better DRM-free service. That's the free market at work.

Re:Linux and TPMs with systemd measured boot [video] by yjftsjthsd-h on Sunday November 05, 2023 @10:25AM (#38151886)
The alternatives also use DRM, because licensing means that it's not a free market.
Re:Linux and TPMs with systemd measured boot [video] by kenjackson on Sunday November 05, 2023 @12:01PM (#38152967)
Why does licensing mean it’s not a free market?
Re:Linux and TPMs with systemd measured boot [video] by HideousKojima on Sunday November 05, 2023 @12:08PM (#38153048)
It's not the licensing, but rather theat copyright is literally a government enforced monopoly on intellectual property that makes it not a free market.
Re:Linux and TPMs with systemd measured boot [video] by kenjackson on Sunday November 05, 2023 @05:16PM (#38156217)
Thanks. That makes sense.
Re:Linux and TPMs with systemd measured boot [video] by yjftsjthsd-h on Sunday November 05, 2023 @01:12PM (#38153806)
Because the vast majority of content is owned by a tiny number of copyright owners (studios, IIRC, but it doesn't really matter who, just how many), who then impose artificial constraints. Netflix didn't decide to implement DRM on its own, it passed through requirements that would be imposed on anyone else too.
Re:Linux and TPMs with systemd measured boot [video] by ForkMeOnTinder on Sunday November 05, 2023 @10:35AM (#38152003)
I love how this comment subtly acknowledges piracy is the only true unencumbered free-market choice.
Re:Linux and TPMs with systemd measured boot [video] by pixl97 on Sunday November 05, 2023 @12:51PM (#38153542)
Depending on what the definition of unencumbered is. Clicking on some link and getting your computer encrypted sounds like it's own means of encumbrance.
Re:Linux and TPMs with systemd measured boot [video] by dist-epoch on Sunday November 05, 2023 @05:15PM (#38156204)
Yes, if 90% of the market moves to piracy, the free market will indeed work and content producers will stop producing stuff.

Or maybe they will all move to TikTok and live from advertising and you'll get a chance to complain about how you hate ads then.

Re:Linux and TPMs with systemd measured boot [video] by alpaca128 on Sunday November 05, 2023 @11:36AM (#38152665)
> leave for a better DRM-free service

Which one?

Is it a free market if 99.9% of companies copy the single most profitable approach to stay afloat (see smartphones), or the entire market is dominated by content rights holders that would make you pay license fees to use the toilet if they could?

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @12:03PM (#38152987)
the other commenter pointed out the only good DRM-free service is thepiratebay and the like
Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Monday November 06, 2023 @09:08AM (#38162752)
There is more DRM free video available in 2023 than literally any other point in human history.

That doesn't entitle you to a specific video unprotected. But the video market is pretty unquestionably not dominated by content right holders (if by that we mean major studios).

Re:Linux and TPMs with systemd measured boot [video] by alpaca128 on Monday November 06, 2023 @04:48PM (#38169502)
If there's such an unprecedented amount of it I am sure you can give an example?
Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Wednesday November 08, 2023 @11:08AM (#38192416)
YouTube.
Re:Linux and TPMs with systemd measured boot [video] by cyberax on Sunday November 05, 2023 @09:42AM (#38151523)
> Like most ordinary folks, my threat model is the use of TPM for DRM.

TPM is pretty much useless for DRM.

Re:Linux and TPMs with systemd measured boot [video] by dmm on Sunday November 05, 2023 @10:08AM (#38151757)
TPM/measured boot can provide proof that a DRM stack is in place.
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:30AM (#38152589)
In an abstract sense, yes, but were anyone to do that in a widely deployed manner there are fairly easy and cheap ways to circumvent it.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @12:05PM (#38153010)
Such as?
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @12:06PM (#38153030)
Such as plugging in a TPM after boot and programming the PCRs however you want
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @12:48PM (#38153507)
To be fair, firmware-based TPMs which are part of the CPU/SoC should be invulnerable to that?

However, TPM-backed DRM on general-purpose OSes is impossible in the current world and is fear-mongering. The TPM can attest to a remote party that you've booted a certain OS, but this OS would need to maintain that chain of trust all the way for it to be effective. That's impossible due to the number of device drivers (which need kernel-level access by design) and various other privileged components a general-purpose OS requires (security software, etc), not to mention the attack surface of all that.

For a hypothetical TPM-backed DRM to work, you'd need Netflix to ship you an entire OS image that you can boot (which the TPM will prove to them that you've booted), and that OS image needs to magically have all the drivers for every potential PC their customers might have, and you need to convince people to reboot their machine every time they want to watch it.

This is all unnecessary considering the current status-quo of DRM is good enough, Widewine does not require a TPM and relies entirely on security by obscurity and it's considered good enough by the industry.

Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @12:54PM (#38153575)
fTPMs are invulnerable to interposing attacks, but if you add a second TPM and program it as Windows (eg) would and redirect all remote attestation requests to that, the remote site has no way to know that this has happened.
Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @01:08PM (#38153756)
My understanding is that TPMs have vendor-embedded certificates/keys, so I guess eventually all discrete TPMs' keys will no longer be accepted by remotely-attestable services to protect against this attack - fTPM will be the only way.

This is all theory though - workable TPM-backed DRM would require so much vendor cooperation, secure programming and break legitimate use-cases that it won't happen any time soon on conventional hardware. It would be cheaper for the media industry to just sell streaming boxes or exclusively target more locked-down platforms (iOS, Android) than try to make it work on generic Windows PCs.

Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Monday November 06, 2023 @06:44AM (#38161288)
Or just use the existing hardware security features that don't let the OS see what's in the relevant video memory at all.

But as you say, that's a much, much smaller attack surface than trying to validate the OS.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @05:08PM (#38156142)
> However, TPM-backed DRM on general-purpose OSes is impossible in the current world and is fear-mongering. The TPM can attest to a remote party that you've booted a certain OS, but this OS would need to maintain that chain of trust all the way for it to be effective

Why don't you think that can work? Windows already limits drivers to ones signed by Microsoft - or else you have to be in "test mode" where - among other things - DRM-protected video playback is disabled!

And Windows already contains a "protected media path" component which protects encrypted DRMed video data.

Sure, there will probably be bugs in a drivers sometimes allowing for a signing bypass and then a DRM bypass if the DRM is done in software. Once they're discovered, those drivers will be blacklisted, and yes, that will mean you can't use that hardware. And the masses will blame the pirates.

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @07:23PM (#38157276)
> Windows already limits drivers to ones signed by Microsoft

I don't believe driver signature enforcement restricts what the driver can do, intentionally or as a result of a vulnerability. Maybe your driver intentionally allows user access to privileged kernel memory, or has a vulnerability that allows the same? Also, signing keys leak every so often.

Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @07:32PM (#38157336)
Microsoft has signed drivers that allow you to modify arbitrary kernel code, so.
Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Monday November 06, 2023 @06:43AM (#38161274)
Because these things are all much, much harder than just passing the decryption to the graphics card which does not permit a userland OS to see what's going on, avoiding the OS entirely. And that already happens. And has happened for years.

A TPM is useless for DRM on a general purpose computing platform because it is significantly inferior to existing widely deployed solutions.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Monday November 06, 2023 @09:32AM (#38163069)
Right now, 720p video is generally not protected because not everyone has a Hollywood-approved graphics card and monitor. If DRM becomes a software thing, they can protect all video.
Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Wednesday November 08, 2023 @09:36AM (#38190860)
720p needs HDCP.

DRM is already a software thing - 720p video is protected by software Widevine. Has been for years.

Re:Linux and TPMs with systemd measured boot [video] by comex on Sunday November 05, 2023 @06:32PM (#38156890)
> Widewine does not require a TPM and relies entirely on security by obscurity and it's considered good enough by the industry.

Widevine's highest security level, L1, does not rely on security by obscurity. But it doesn't rely on a TPM either; rather, it relies on a trusted execution environment, like ARM TrustZone or Intel CSE[1], that is more highly privileged than the OS itself. Microsoft PlayReady is similar.

Apple FairPlay, in contrast, is worse: it's disabled if you turn off Secure Boot on Macs.

[1] https://www.intel.com/content/www/us/en/developer/articles/n...

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @07:22PM (#38157273)
And it relies on that TEE having a trusted operating system. How do you get that? Secure boot.
Re:Linux and TPMs with systemd measured boot [video] by aseipp on Sunday November 05, 2023 @01:02PM (#38153670)
Using a TPM for remote attestation of device state is basically worthless in the generic PC UEFI world because there is pretty much unlimited surface area for holes to leverage, from motherboards that falsely report secure boot states to firmware bypasses to using your own TPM to just exploiting a vulnerable kernel driver that has a valid windows codesigning signature.

In practice places that want "attestation-like" functionality, like Riot do for anti-cheat, just load mandatory kernel modules instead and require e.g. Type 1 hypervisor-based security in Windows to be enabled. Or they just obfuscate everything and run blobs. These can still be bypassed but it's still difficult and in contrast fully controlled by their software stack, which is more usable for them for more players. It's good enough, in other words.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @10:56AM (#38152221)
The TPM allows Hollywood to verify that you're running an Approved(TM) operating system. It's also very useful for WEI, which is web DRM - it allows Google to verify that you're running an Approved(TM) operating system and browser.

Linux will never be approved, unless it's heavily locked down, by the way.

Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:29AM (#38152578)
If it's that simple, can you point at a single example of Hollywood using the TPM for access control?
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @11:57AM (#38152921)
I forgot all new technologies spring out of the ground full-formed as soon as they are possible. They haven't done it yet. But look at Google's WEI.

You can also look at how any other DRM works. It's all based on hardware and software locks very similar to what TPMs do.

Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @12:11PM (#38153095)
TPMs have been widely deployed for around a decade. Widevine doesn't use them - it makes use of the protected video path hardware built into the GPU or motherboard chipset.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @05:04PM (#38156109)
As far as I know they only became mandatory with Windows 11, so give them a few years to become universal.
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @07:34PM (#38157351)
Windows 11 was the first release to enforce anything at the OS level, but Windows client sticker certification has required them since 8.1, released in 2013. As a result almost all Windows client systems in the wild have some form of TPM by default (in most cases running on the ME or the PSP)
Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Monday November 06, 2023 @06:46AM (#38161300)
Indeed, more systems than have the existing PlayReady 3000 GPU mechanisms.

But services still use that rather than a TPM, because a TPM is useless.

Re:Linux and TPMs with systemd measured boot [video] by aseipp on Sunday November 05, 2023 @01:07PM (#38153732)
That's a lot of words to say "I don't know."
Re:Linux and TPMs with systemd measured boot [video] by zorgmonkey on Sunday November 05, 2023 @03:40PM (#38155432)
For what it is worth google has fortunately abandonded the WEI proposal, a quote from the README of https://github.com/RupertBenWiser/Web-Environment-Integrity/

  NOTE: This proposal is no longer pursued.
  Thank you for all the constructive feedback and engagement on the topic. An Android-specific API that does not target the open web is being considered here.
The android specific proposal is only adding support for it to WebView, which developers actually could already by combining the WebView and play integrity APIs, so that as much as I don't love it that doesn't seem too terrible if it is just saving developers from writing some boilerplate code to connect the two. Here is the recent discussion about the WebView changes https://news.ycombinator.com/item?id=38118627
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:28AM (#38152568)
Netflix doesn't make use of the TPM.
Re:Linux and TPMs with systemd measured boot [video] by FirmwareBurner on Sunday November 05, 2023 @11:42AM (#38152744)
Yeah, but that goes to show you how limited in know-how people complaining about TPM are, and they keep spreading FUD like this and others keep buying it.

And this is a supposedly tech focused platform where the tech literacy is at its highest. I wouldn't be surprised to read comments that TPM is used by Bill Gates to give you Covid.

Re:Linux and TPMs with systemd measured boot [video] by aseipp on Sunday November 05, 2023 @01:23PM (#38153930)
My rule of thumb is that I don't listen to anyone who can't write exploits for modern software stacks (OS kernels, browsers.) And even then, you can still ignore 50% of those people too, as they are cranks. In contrast, most of the people here wailing in every one of these threads couldn't overflow an integer if you let them write the for loop.

> I wouldn't be surprised to read comments that TPM is used by Bill Gates to give you Covid.

One time on here, someone linked an academic paper describing an HTTP PCIe accelerator. One of the (eight) authors was from Tsinghua, and so naturally someone in the comments started freaking out about how this was a plan by the Chinese Communist Deep State to fund this for mass surveillance. When I asked him how this would work and what threat he expected, he described an elaborate Tom Clancy plotline where these PCIe cards will actually be snooping every key exchange, keeping them in memory, and they would be secretly equipped and manufactured with short wave radio devices that would allow Chinese agents to "exfiltrate private keys" (whatever that means) by posing as janitors and technicians in the datacenter and beaming those radio messages to them.

That was his threat model for "thing you literally plug into your fucking server and put on a shared memory bus."

Now, how this is expected to work when most HTTP accelerators don't do key exchange (and never ever see long term keys), or how these keys would benefit them when presumably many encrypted comms do not go through cables controlled and spliced by the nefarious, evil-loving Chinese -- well, that's left as an exercise for you!

Re:Linux and TPMs with systemd measured boot [video] by egberts1 on Monday November 06, 2023 @01:12PM (#38166331)
For just $30.00 (USD), you too could possess a PCIe bus snooper.

No one would be the wiser.

https://www.ebay.com/itm/186136320010?chn=ps&mkevt=1&mkcid=2...

Re:Linux and TPMs with systemd measured boot [video] by zlg_codes on Sunday November 05, 2023 @10:28PM (#38158495)
The TPM is a black box that has no business in hardware. It simply takes control away from you. Make excuses for 'only when watching a video' or 'only when you play a game', the overwhelming trend in technology is that any practical means to lock things down WILL be explored by capital, to maintain social dominance.

MS already has TPM and secure boot requirements. What's stopping them from colluding with the Copyright Cartel and embedding keys in the firmware that, if removed, disable functionality on the device or on property networks?

You are giving FAR too much trust to entities proven to have an interest in limiting computing freedoms.

Re:Linux and TPMs with systemd measured boot [video] by Mindwipe on Monday November 06, 2023 @06:49AM (#38161325)
> MS already has TPM and secure boot requirements. What's stopping them from colluding with the Copyright Cartel and embedding keys in the firmware that, if removed, disable functionality on the device or on property networks?

That Nvidia, Intel and AMD already put a better black box with a smaller attack surface in the GPU years ago for them to use.

Re:Linux and TPMs with systemd measured boot [video] by zlg_codes on Tuesday November 14, 2023 @03:32PM (#38269302)
Interested in reading about what you mean wrt GPU black boxes.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @12:02PM (#38152980)
It will when every system has a TPM.
Re:Linux and TPMs with systemd measured boot [video] by rnhmjoj on Sunday November 05, 2023 @09:15AM (#38151288)
It doesn't need to be the NSA; if your chip is vulnerable and exploits published online I don't think it's too far fetched that a resourceful thief could try to unlock your disk if he thinks it has valuable content (bank accounts, cryptocurrency, passwords, etc.)

Why take unnecessary risks when you can just use GRUB+LUKS and type the passphrase at boot?

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @09:20AM (#38151322)
GRUB+LUKS can also have exploits published online? If that happens, you upgrade to a newer version.

TPM is the same - any known vulnerabilities would generally get patched as part of firmware updates released by your vendor.

If the TPM is known vulnerable and a patch doesn't exist then fair enough you can stop using it depending on your threat model, but the same can be said for software implementations.

> when you can just use GRUB+LUKS and type the passphrase at boot?

This is a user experience drawback and opens you to other avenues of attack like passphrase bruteforce if you don't choose a strong (and inconvenient/slow to type) one. It's also impossible for servers or embedded devices which you want to be able to boot unattended.

Re:Linux and TPMs with systemd measured boot [video] by rnhmjoj on Sunday November 05, 2023 @11:42AM (#38152750)
> TPM is the same

It's not really: LUKS is an open standard and GRUB is a free software that implements it. With a TPM you're likely to get a chip that is 100% a black box, with the exception of a few people who signed NDAs and researches that have knowledge and tools to poke into it.

> generally get patched as part of firmware updates released by your vendor

If it can even be fixed with a softwar update. Also, you're very lucky to get maybe a couple of years of firmware updates, then your're on your own.

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @12:40PM (#38153418)
> with the exception of a few people who signed NDAs and researches that have knowledge and tools to poke into it.

This is good enough for the 90% of people who currently operate without full-disk-encryption at all. It would be a huge improvement.

Obviously, it's up to each individual user to evaluate their threat model and proceed accordingly. Nobody is forcing you to use a TPM, you can still use LUKS/etc and completely ignore the TPM.

Re:Linux and TPMs with systemd measured boot [video] by chlorion on Sunday November 05, 2023 @03:18PM (#38155205)
That's not really true all of the time, some AMD fTPMs have physical vulnerabilities for example, that allow compromising the entire thing with some tools and a few hours of time. Software can't fix this since it's a flaw in the hardware itself, you'd need to buy new hardware to fix this.

https://arxiv.org/abs/2304.14717

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @07:24PM (#38157296)
Thanks, very interesting. Is there a distilled version of this or an announcement with a list of vulnerable chips?
Re:Linux and TPMs with systemd measured boot [video] by chlorion on Tuesday November 07, 2023 @03:17PM (#38182198)
I don't seem to have bookmarked anything except for the link I posted earlier and the HN thread that discussed this (posted below).

From my memory it was every zen module up to and including zen3.

It's possible that zen4 has been fixed but I'm not certain about that.

There is a "requirements" section of the PDF that talks a little bit more about which CPUs were effected but that isn't distilled!

https://news.ycombinator.com/item?id=35787195

Re:Linux and TPMs with systemd measured boot [video] by SenpaiSilver on Sunday November 05, 2023 @09:37AM (#38151479)
How is the TPM protecting my if my laptop with the TPM chip is stolen?

I understand that I will be protected from removing the HDD/SSD and putting it into another machine to read the data, but does it really protect me from anything else?

Re:Linux and TPMs with systemd measured boot [video] by sokoloff on Sunday November 05, 2023 @09:47AM (#38151574)
What other protections might you expect it to provide?

Being unable to retrieve the data on protected drives (which could include cookies, passwords, ID, photos/videos, etc.) is the value.

Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:34AM (#38152644)
Preventing your storage from being put in another device is what it's meant to be protecting you against. If it's still in the original device then an attacker is still blocked by your login password.
Re:Linux and TPMs with systemd measured boot [video] by huggingmouth on Sunday November 05, 2023 @01:25PM (#38153973)
No, the true question is why should we switch to tpms, and what are we giving up if we do.

In my experience, tpms are worse than worthless since they prevent rescuing garddrives from bricked systems. Nontpm luks can be unlocked on any system.

Re:Linux and TPMs with systemd measured boot [video] by Nextgrid on Sunday November 05, 2023 @07:26PM (#38157305)
You can enroll a backup key if your full-disk-encryption system supports it. Both LUKS and Bitlocker do, so the TPM key can be one of many (the second one being a backup key stored away securely).

It'll only prevent you from recovering a hard drive if you configured it that way - ie it's doing its job as designed.

Re:Linux and TPMs with systemd measured boot [video] by Bognar on Sunday November 05, 2023 @02:04PM (#38154436)
I'm always curious what threat model that is valid against TPMs is not also valid against CPUs and main memory.
Re:Linux and TPMs with systemd measured boot [video] by traverseda on Sunday November 05, 2023 @03:29PM (#38155327)
Or anyone with a pcileach.
Re:Linux and TPMs with systemd measured boot [video] by dist-epoch on Sunday November 05, 2023 @09:12AM (#38151264)
Because the alternative, not using SecureBoot, is strictly worse in all scenarios.

Just like HTTP vs HTTPS with LetsEncrypt. Even if an attacker can compromise a web-server rendering HTTPS protection useless, it's still better to always use HTTPS.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @10:59AM (#38152248)
You're framing this as a choice between SecureBoot and InsecureBoot, but it's actually a choice between SecureBoot and DRM, or InsecureBoot and no DRM.

Besides, SecureBoot isn't strictly better in all scenarios. The most obvious one is the one where you forgot how to log in, and want to retrieve your data.

Re:Linux and TPMs with systemd measured boot [video] by lxgr on Sunday November 05, 2023 @12:22PM (#38153219)
> [...] where you forgot how to log in, and want to retrieve your data.

That's a use case typically better addressed with good backups, since there are indeed more failure modes when using effective full disk encryption.

Re:Linux and TPMs with systemd measured boot [video] by dist-epoch on Sunday November 05, 2023 @05:01PM (#38156085)
> choice between SecureBoot and DRM, or InsecureBoot and no DRM.

That's just false. I've had SecureBoot enabled for 10 years and I didn't have more DRM because of this.

You're talking hypotheticals, slippery slope, etc...

> The most obvious one is the one where you forgot how to log in

SecureBoot is separate and does not imply full disk encryption. If you choose to use full disk encryption, yes, you can be locked out, with SecureBoot or not.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @05:03PM (#38156100)
> I've had SecureBoot enabled for 10 years and I didn't have more DRM because of this.

Maybe stop pretending to understand what the parent comment is talking about.

> SecureBoot is separate and does not imply full disk encryption. If you choose to use full disk encryption, yes, you can be locked out, SecureBoot or not.

There's no purpose to Secure Boot if I can just put your hard drive in a different computer without Secure Boot.

Re:Linux and TPMs with systemd measured boot [video] by dist-epoch on Sunday November 05, 2023 @05:09PM (#38156147)
> There's no purpose to Secure Boot if I can just put your hard drive in a different computer without Secure Boot.

There are scenarios where you can't take the hard drive out (evil maid attacks, public computers, ...).

But regardless, you are attacking SecureBoot with an argument against full disk encryption.

Re:Linux and TPMs with systemd measured boot [video] by fsflover on Sunday November 05, 2023 @10:12AM (#38151786)
> TPM chips are not opensource

I'm using Librem 14 with a TPM chip with exclusively free software.

Re:Linux and TPMs with systemd measured boot [video] by zlg_codes on Sunday November 05, 2023 @11:42PM (#38158931)
Slight segue, have you had any luck with distros besides PureOS? I want to make my own LFS for my Librem but I'm not sure what my custom system would need to support the EC firmware and pureboot, etc.
Re:Linux and TPMs with systemd measured boot [video] by fsflover on Monday November 06, 2023 @02:38AM (#38159800)
I'm using Qubes OS. AFAIK Pureboot should work fine with any distro, but I don't know the details. There are also EC firmware installation instructions for Qubes on their forums.
Re:Linux and TPMs with systemd measured boot [video] by zlg_codes on Monday November 06, 2023 @09:03PM (#38172236)
I've considered that one as well, especially once I upgrade to 64GB of RAM. Aside from hardware-accelerated needs like streaming, gaming, browsing, etc, I could do most of my software experimentation inside VMs and keep my system clean(ish).

How has your experience been with Qubes?

Re:Linux and TPMs with systemd measured boot [video] by fsflover on Tuesday November 07, 2023 @09:55AM (#38177448)
I'm very happy with Qubes OS, using it as a daily driver for many years. It does indeed helps to organize your digital life and gives a great sense of security and control over your computer. I tried to list its advantages here: https://forum.qubes-os.org/t/how-to-pitch-qubes-os/4499/15

See also: https://forum.qubes-os.org/t/qubesos-4-2-rc3-clean-install-i...

Re:Linux and TPMs with systemd measured boot [video] by cedws on Sunday November 05, 2023 @10:53AM (#38152192)
This feature isn't really for people like you and me. It's for big companies like Red Hat and Google to utilise on their servers. Google have their own TPMs they can trust. Red Hat probably have the paperwork to say their TPMs are safe.

But worrying about your TPM being backdoored is pointless anyway. If they can backdoor your TPM, they can backdoor anything.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @11:02AM (#38152289)
> If they can backdoor your TPM, they can backdoor anything.

[citation needed]

Re:Linux and TPMs with systemd measured boot [video] by cedws on Sunday November 05, 2023 @11:09AM (#38152346)
There are hundreds of components in a computer and the TPM would be one of the hardest to backdoor. Bear in mind where this stuff is manufactured. The manufacturer would want nothing to do with funny business like this because it could harm their sales, so it would have to be done under their nose, or they would have to be compelled by the government.

US intelligence agencies don't generally go around mass backdooring things. It's too risky. They carefully target their attacks.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @11:12AM (#38152372)
It's... extremely easy for the government to compel mass backdoors in TPMs. Don't you remember Clipper? And the backdoor would be completely invisible until they used it, since TPMs aren't auditable.
Re:Linux and TPMs with systemd measured boot [video] by kenjackson on Sunday November 05, 2023 @12:04PM (#38153004)
But it’s easy for governments to compel backdoors into any component. Even open source for non trivial code is easy to introduce obscure bugs that are exploitable.
Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @05:02PM (#38156098)
The backdoor in most components is really complicated. Backdooring a TPM is relatively easy, and undetectable.
Re:Linux and TPMs with systemd measured boot [video] by sangnoir on Sunday November 05, 2023 @11:16AM (#38152433)
> [citation needed]

Picture-of-a-Cisco-router-getting-a-hardware-implant-installed-after-being-indicted-during-shipping.snowden-files.jpg

Re:Linux and TPMs with systemd measured boot [video] by fsflover on Monday November 06, 2023 @10:50AM (#38164166)
You can order anti-interdiction services from Purism to be sure your hardware isn't tampered with during shipping.
Re:Linux and TPMs with systemd measured boot [video] by mjg59 on Sunday November 05, 2023 @11:26AM (#38152552)
How would an end user simply check them for backdoors if they were open source? Security auditing is a skilled job, and the people best capable of identifying security flaws or backdoors are generally able to do that given a binary blob as well.
Re:Linux and TPMs with systemd measured boot [video] by JohnFen on Sunday November 05, 2023 @11:37AM (#38152684)
I dislike TPM personally (for a very different reason), but...

They reduce the attack surface. Not only in terms of the actual interface, but in terms of who has the ability to subvert the security. Using TPM may or may not be effective security against governments, manufacturers, and the like, but they are effective security against a whole host of other bad actors.

It could be argued that's still a worthwhile improvement. You can engage in other layers of security regardless of whether TPM is being used to help cover the areas TPM may not.

Re:Linux and TPMs with systemd measured boot [video] by immibis on Sunday November 05, 2023 @12:05PM (#38153006)
They're dangerous because the same effective security can be turned against the legitimate owner of the machine. The TPM effectively belongs to whoever configured it first.
Re:Linux and TPMs with systemd measured boot [video] by JohnFen on Sunday November 05, 2023 @04:36PM (#38155900)
TPM just stores crypto keys. It does so in a way that the user can't get them, which is my objection to the scheme (because it lets entities set up encrypted channels that I can't monitor).

However, that's the only way it can be turned against the user, and the other user security gains are real.

Re:Linux and TPMs with systemd measured boot [video] by o11c on Monday November 06, 2023 @12:20AM (#38159149)
TPMs are also highly effective against "you can just use a LiveCD to try Linux temporarily, then reboot and return to Windows."
Re:Linux and TPMs with systemd measured boot [video] by azzentys on Sunday November 05, 2023 @12:51PM (#38153543)
I'm curious if open source TPM would mean easier side-channel attacks. What's the reason everyone is super hush-hush around how their Hardware Security works?
Re:Linux and TPMs with systemd measured boot [video] by badrabbit on Sunday November 05, 2023 @01:13PM (#38153811)
Because it isn't a silver bullet but rather a countermeasure against rootkits, bootkits and certain physical tampering by regular and insider threat actors.
Re:Linux and TPMs with systemd measured boot [video] by chlorion on Sunday November 05, 2023 @03:24PM (#38155274)
This is very important.

For some reason in these threads nobody seems to bring up or realize that modern AMD CPU's fTPM is completely broken and not fixable via ucode updates. The AMD TPM exploit is exploitable by a "regular" person too, it doesn't have to be a state level actor, just some techy person with a few tools and physical access to the system.

We can't audit these things at all and I don't think we should just trust that they are safe, and we know for a fact that many of them aren't safe, even against "regular" threats.

(AMD fTPM exploit source) https://arxiv.org/abs/2304.14717

Re:Linux and TPMs with systemd measured boot [video] by mkopec on Sunday November 05, 2023 @03:34PM (#38155380)
Dropping a link to a project attempting to create a fully open source TPM: https://twpm.dasharo.com/
Re:Linux and TPMs with systemd measured boot [video] by fsflover on Monday November 06, 2023 @10:49AM (#38164141)
How does it compare with Pureboot with Librem Key?
Re:Linux and TPMs with systemd measured boot [video] by sweetjuly on Sunday November 05, 2023 @03:56PM (#38155563)
No ASIC is ever going to satisfy your desire to audit. Even if they publish the RTL, you can't verify that this is what they synthesized, that this is what the fab actually produced, etc. You have to trust hardware because it's your everything. Even with relatively obvious attacks like backdooring the bootrom (which can be done by modifying just the metal layers!), practically speaking no one is going to ever catch it because modern processes are simply too fine for all but the fabs themselves to physically inspect. This isn't even to mention more clever attacks which attack the doping of the silicon [1] for individual transistors (which cannot be generically detected post fabrication by any publicly known technique).

Embrace the suck :) Sure, you can't truly trust hardware, but there's nothing to be done about it anyhow and so you may as well reap the benefits of trusting it.

[1] http://sharps.org/wp-content/uploads/BECKER-CHES.pdf

Re:Linux and TPMs with systemd measured boot [video] by JohnFen on Sunday November 05, 2023 @04:52PM (#38156021)
> there's nothing to be done about it anyhow and so you may as well reap the benefits of trusting it.

Alternatively, you can avoid relying on any single thing to be secure and use layered security approaches instead.

Re:Linux and TPMs with systemd measured boot [video] by AlotOfReading on Sunday November 05, 2023 @06:38PM (#38156946)
There is no layered security approach that can fully mitigate malicious hardware. Even if you have a perfect cryptosystem where everything is running fully homomorphic encryption so that plaintext literally doesn't exist, you're still susceptible at the boundaries and to metadata leakages.

On real computers you're also susceptible to the hardware simply not executing your code properly and a hundred other things.

Since you can't fully mitigate malicious hardware, you have to state a more limited threat model for there to be any useful discussion.

Re:Linux and TPMs with systemd measured boot [video] by sweetjuly on Monday November 06, 2023 @12:26AM (#38159185)
What security boundary can you hope to hold if the CPU is running malicious code straight out of reset (such as through a bootrom implant)? No amount of layers and defense in depth can paper over the fact that your hardware is physically compromised.

It's the whole trusting-trust thing. We don't really have a way to solve it, so it's best not to burn yourself out on it.

Re:Linux and TPMs with systemd measured boot [video] by matheusmoreira on Sunday November 05, 2023 @08:36PM (#38157786)
We need the ability to create computer hardware at home just like we can create software at home. Until we can make chips in our garage, we'll be at the mercy of giant corporations and the governments looking to subvert our security through them.
Re:Linux and TPMs with systemd measured boot [video] by spicymaki on Monday November 06, 2023 @09:24AM (#38162979)
Some TPMs are FIPS-140 compliant and go through 3rd party audits and extra screening. If you purchase a device that is compliant you can then retrieve a certificate of compliance. Some TPMs can be made compliant with the appropriate firmware update.

If you don't trust FIPS then you could support open source TPMs and help audit them.

Other than that if you care enough about it and had the prerequisite skills and money, you could develop your own TPM (the interface specifications are online) and run your own trusted and audited Linux system.