Category Archives: Без категория

[$] The proper time to split struct page

Post Syndicated from original https://lwn.net/Articles/937839/

The page structure sits at the core of the kernel’s
memory-management subsystem; one such structure exists for every page of
installed RAM. This structure is increasingly seen as a problem, though,
and phasing it out is one of the many side projects associated with the folio conversion. One step in that direction
is currently meeting some pushback from memory-management developers,
though, who think that some of these changes are coming too soon.

Security updates for Friday

Post Syndicated from original https://lwn.net/Articles/938233/

Security updates have been issued by Debian (lemonldap-ng and php-dompdf), Red Hat (.NET 6.0, .NET 7.0, firefox, and thunderbird), Scientific Linux (firefox and thunderbird), SUSE (ghostscript, installation-images, kernel, php7, python, and python-Django), and Ubuntu (linux-azure, linux-gcp, linux-ibm, linux-oracle, mozjs102, postgresql-9.5, and tiff).

AlmaLinux to diverge (slightly) from RHEL

Post Syndicated from original https://lwn.net/Articles/938165/

AlmaLinux has announced that
the distribution will no longer be a strict clone of Red Hat Enterprise
Linux, but will maintain ABI compatibility.

For a typical user, this will mean very little change in your use
of AlmaLinux. Red Hat-compatible applications will still be able to
run on AlmaLinux OS, and your installs of AlmaLinux will continue
to receive timely security updates. The most remarkable potential
impact of the change is that we will no longer be held to the line
of “bug-for-bug compatibility” with Red Hat, and that means that we
can now accept bug fixes outside of Red Hat’s release cycle. While
that means some AlmaLinux OS users may encounter bugs that are not
in Red Hat, we may also accept patches for bugs that have not yet
been accepted upstream, or shipped downstream.

[$] Stabilizing per-VMA locking

Post Syndicated from original https://lwn.net/Articles/937943/

The kernel-development process routinely absorbs large changes to
fundamental subsystems and still produces stable releases every nine or ten
weeks. On occasion, though, the development community’s luck runs out.
The per-VMA locking work that went into the
6.4 release is a case in point; it looked like a well-tested change that
improved page-fault scalability. There turned out to be a few demons
hiding in that code, though, that made life difficult for early adopters of
the 6.4 kernel.

Security updates for Thursday

Post Syndicated from original https://lwn.net/Articles/938108/

Security updates have been issued by Debian (ruby-doorkeeper), Fedora (mingw-nsis and thunderbird), Red Hat (bind9.16, nodejs, nodejs:16, nodejs:18, python38:3.8 and python38-devel:3.8, and rh-nodejs14-nodejs), Slackware (krb5), SUSE (geoipupdate, installation-images, libqt5-qtbase, python-Django1, and skopeo), and Ubuntu (knot-resolver, lib3mf, linux, linux-aws, linux-kvm, linux-lowlatency, linux-raspi, linux, linux-aws, linux-kvm, linux-lts-xenial, linux-azure, linux-gcp, linux-ibm, linux-oracle, linux-azure-fde, linux-xilinx-zynqmp, and scipy).

[$] Testing for storage and filesystems

Post Syndicated from original https://lwn.net/Articles/937830/

The kdevops
kernel-testing framework has come up at several earlier summits, including
in two separate sessions at last year’s event.
Testing kernel filesystems and the block layer, not to mention lots of
other kernel subsystems, has become increasingly
important over time.
So it was no
surprise that Luis Chamberlain led a
combined storage and filesystem session at the
2023 Linux Storage, Filesystem,
Memory-Management and BPF Summit
to talk more about testing, the
resources needed for it, and what can be done to improve it. It was the
final session for this year’s summit, so this article completes our coverage.

Convening public benefit and charitable foundations working in open domains (OSI blog)

Post Syndicated from original https://lwn.net/Articles/938021/

Over on the Open Source Initiative (OSI) blog, the organization has announced the Open Policy Alliance (OPA), which is meant to bring together various non-profit organizations to help educate and inform US policy makers about open-source software and its needs:

The need to create such a program is more urgent today due to the rise of new regulations in the software industry and adjacent open domains around the world. Cyber security, the societal impact of AI, data and privacy are important issues for legislators globally. At the same time, the COVID-19 pandemic drove collaborative development to unprecedented levels and took Open Source software, open research, open content and data from mainstream to main stage. Moving forward, developing these important public policies whilst not harming the ecosystem requires an understanding of how the Open Source ecosystem works. Ensuring stakeholders without historic benefit of representation are included in those discussions becomes paramount to that end.

The OPA will focus on educating public policy makers on Open Source to inform their development and deliberation of new policy concepts. There are unintended consequences that come from a lack of understanding of how open collaboration works in practice. The OPA will address this as well as the historic absence of contribution from underrepresented groups. The interest areas of the OPA community will complement those of Digitable Public Goods Alliance, a UNICEF multi-stakeholder initiative with a mission to accelerate the attainment of sustainable development goals in low- and middle-income countries that OSI joined earlier this year.

[$] The FUSE BPF filesystem

Post Syndicated from original https://lwn.net/Articles/937433/

The Filesystem
in Userspace
(FUSE) framework can be used to create a “stacked”
filesystem, where the FUSE piece adds specialized functionality
(e.g. reporting different file metadata) atop an
underlying kernel filesystem. The performance of such filesystems leaves a
lot to be desired, however, so
the FUSE
BPF filesystem
has been proposed to try to improve the performance to
be close to that of the underlying native filesystem. It came up in the
context of a session on FUSE passthrough
earlier in the
2023 Linux Storage, Filesystem,
Memory-Management and BPF Summit
, but the details of FUSE BPF were more
fully described by Daniel Rosenberg in a combined filesystem and BPF
session on the final day of the summit.

SUSE to create a fork of RHEL

Post Syndicated from original https://lwn.net/Articles/937863/

SUSE has announced
that it is getting into the business of creating RHEL clones and investing
$10 million in the project.

SUSE remains fully committed to investing in its highly regarded
Linux solutions such as SLE and openSUSE that countless satisfied
enterprise customers and the community rely on. At the same time,
it acknowledges that enterprises and the open source community
deserve choice and freedom from vendor lock-in. SUSE has a long
history in empowering and supporting users with mixed Linux
environments.

SUSE is committed to working with the open source community to
develop a long-term, enduring compatible alternative for RHEL and
CentOS users. SUSE plans to contribute this project to an open
source foundation, which will provide ongoing free access to
alternative source code.

Security updates for Tuesday

Post Syndicated from original https://lwn.net/Articles/937879/

Security updates have been issued by Debian (mediawiki and node-tough-cookie), Red Hat (bind, kernel, kpatch-patch, and python38:3.8, python38-devel:3.8), SUSE (kernel, nextcloud-desktop, and python-tornado), and Ubuntu (dwarves-dfsg and thunderbird).

Roots of Trust are difficult

Post Syndicated from original https://mjg59.dreamwidth.org/66907.html

The phrase “Root of Trust” turns up at various points in discussions about verified boot and measured boot, and to a first approximation nobody is able to give you a coherent explanation of what it means[1]. The Trusted Computing Group has a fairly wordy definition, but (a) it’s a lot of words and (b) I don’t like it, so instead I’m going to start by defining a root of trust as “A thing that has to be trustworthy for anything else on your computer to be trustworthy”.

(An aside: when I say “trustworthy”, it is very easy to interpret this in a cynical manner and assume that “trust” means “trusted by someone I do not necessarily trust to act in my best interest”. I want to be absolutely clear that when I say “trustworthy” I mean “trusted by the owner of the computer”, and that as far as I’m concerned selling devices that do not allow the owner to define what’s trusted is an extremely bad thing in the general case)

Let’s take an example. In verified boot, a cryptographic signature of a component is verified before it’s allowed to boot. A straightforward implementation of a verified boot implementation has the firmware verify the signature on the bootloader or kernel before executing it. In this scenario, the firmware is the root of trust – it’s the first thing that makes a determination about whether something should be allowed to run or not[2]. As long as the firmware behaves correctly, and as long as there aren’t any vulnerabilities in our boot chain, we know that we booted an OS that was signed with a key we trust.

But what guarantees that the firmware behaves correctly? What if someone replaces our firmware with firmware that trusts different keys, or hot-patches the OS as it’s booting it? We can’t just ask the firmware whether it’s trustworthy – trustworthy firmware will say yes, but the thing about malicious firmware is that it can just lie to us (either directly, or by modifying the OS components it boots to lie instead). This is probably not sufficiently trustworthy!

Ok, so let’s have the firmware be verified before it’s executed. On Intel this is “Boot Guard”, on AMD this is “Platform Secure Boot”, everywhere else it’s just “Secure Boot”. Code on the CPU (either in ROM or signed with a key controlled by the CPU vendor) verifies the firmware[3] before executing it. Now the CPU itself is the root of trust, and, well, that seems reasonable – we have to place trust in the CPU, otherwise we can’t actually do computing. We can now say with a reasonable degree of confidence (again, in the absence of vulnerabilities) that we booted an OS that we trusted. Hurrah!

Except. How do we know that the CPU actually did that verification? CPUs are generally manufactured without verification being enabled – different system vendors use different signing keys, so those keys can’t be installed in the CPU at CPU manufacture time, and vendors need to do code development without signing everything so you can’t require that keys be installed before a CPU will work. So, out of the box, a new CPU will boot anything without doing verification[4], and development units will frequently have no verification.

As a device owner, how do you tell whether or not your CPU has this verification enabled? Well, you could ask the CPU, but if you’re doing that on a device that booted a compromised OS then maybe it’s just hotpatching your OS so when you do that you just get RET_TRUST_ME_BRO even if the CPU is desperately waving its arms around trying to warn you it’s a trap. This is, unfortunately, a problem that’s basically impossible to solve using verified boot alone – if any component in the chain fails to enforce verification, the trust you’re placing in the chain is misplaced and you are going to have a bad day.

So how do we solve it? The answer is that we can’t simply ask the OS, we need a mechanism to query the root of trust itself. There’s a few ways to do that, but fundamentally they depend on the ability of the root of trust to provide proof of what happened. This requires that the root of trust be able to sign (or cause to be signed) an “attestation” of the system state, a cryptographically verifiable representation of the security-critical configuration and code. The most common form of this is called “measured boot” or “trusted boot”, and involves generating a “measurement” of each boot component or configuration (generally a cryptographic hash of it), and storing that measurement somewhere. The important thing is that it must not be possible for the running OS (or any pre-OS component) to arbitrarily modify these measurements, since otherwise a compromised environment could simply go back and rewrite history. One frequently used solution to this is to segregate the storage of the measurements (and the attestation of them) into a separate hardware component that can’t be directly manipulated by the OS, such as a Trusted Platform Module. Each part of the boot chain measures relevant security configuration and the next component before executing it and sends that measurement to the TPM, and later the TPM can provide a signed attestation of the measurements it was given. So, an SoC that implements verified boot should create a measurement telling us whether verification is enabled – and, critically, should also create a measurement if it isn’t. This is important because failing to measure the disabled state leaves us with the same problem as before; someone can replace the mutable firmware code with code that creates a fake measurement asserting that verified boot was enabled, and if we trust that we’re going to have a bad time.

(Of course, simply measuring the fact that verified boot was enabled isn’t enough – what if someone replaces the CPU with one that has verified boot enabled, but trusts keys under their control? We also need to measure the keys that were used in order to ensure that the device trusted only the keys we expected, otherwise again we’re going to have a bad time)

So, an effective root of trust needs to:

1) Create a measurement of its verified boot policy before running any mutable code
2) Include the trusted signing key in that measurement
3) Actually perform that verification before executing any mutable code

and from then on we’re in the hands of the verified code actually being trustworthy, and it’s probably written in C so that’s almost certainly false, but let’s not try to solve every problem today.

Does anything do this today? As far as I can tell, Intel’s Boot Guard implementation does. Based on publicly available documentation I can’t find any evidence that AMD’s Platform Secure Boot does (it does the verification, but it doesn’t measure the policy beforehand, so it seems spoofable), but I could be wrong there. I haven’t found any general purpose non-x86 parts that do, but this is in the realm of things that SoC vendors seem to believe is some sort of value-add that can only be documented under NDAs, so please do prove me wrong. And then there are add-on solutions like Titan, where we delegate the initial measurement and validation to a separate piece of hardware that measures the firmware as the CPU reads it, rather than requiring that the CPU do it.

But, overall, the situation isn’t great. On many platforms there’s simply no way to prove that you booted the code you expected to boot. People have designed elaborate security implementations that can be bypassed in a number of ways.

[1] In this respect it is extremely similar to “Zero Trust”
[2] This is a bit of an oversimplification – once we get into dynamic roots of trust like Intel’s TXT this story gets more complicated, but let’s stick to the simple case today
[3] I’m kind of using “firmware” in an x86ish manner here, so for embedded devices just think of “firmware” as “the first code executed out of flash and signed by someone other than the SoC vendor”
[4] In the Intel case this isn’t strictly true, since the keys are stored in the motherboard chipset rather than the CPU, and so taking a board with Boot Guard enabled and swapping out the CPU won’t disable Boot Guard because the CPU reads the configuration from the chipset. But many mobile Intel parts have the chipset in the same package as the CPU, so in theory swapping out that entire package would disable Boot Guard. I am not good enough at soldering to demonstrate that.

comment count unavailable comments

[$] The rest of the 6.5 merge window

Post Syndicated from original https://lwn.net/Articles/937006/

Linus Torvalds released
6.5-rc1
and closed the merge window for this development cycle on
July 9. By that point, 11,730 non-merge changesets had been pulled
into the mainline for 6.5; over 7,700 of those were pulled after
the first-half merge-window summary was
written. The second half of the merge window saw a lot of code coming into
the mainline and a long list of significant changes.

Security updates for Monday

Post Syndicated from original https://lwn.net/Articles/937803/

Security updates have been issued by Debian (firefox-esr, fusiondirectory, ocsinventory-server, php-cas, and thunderbird), Fedora (dav1d, perl-CPAN, and yt-dlp), Red Hat (python39:3.9 and python39-devel:3.9), Slackware (mozilla), SUSE (prometheus-ha_cluster_exporter and prometheus-sap_host_exporter), and Ubuntu (ghostscript, linux-azure, linux-intel-iotg, linux-intel-iotg-5.15, and ruby-doorkeeper).