News for hackers. Stuff that matters.
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