Skip to content

bun: 1.4.2 -> 1.4.4 - #577354

Merged
06kellyjac merged 1 commit into
NixOS:masterfrom
baptiste0928:update-bun
Nov 2, 2026
Merged

06kellyjac merged 1 commit into
NixOS:masterfrom
baptiste0928:update-bun

Conversation

@baptiste0928

@baptiste0928 baptiste0928 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Changelog: https://bun.sh/blog/bun-v1.4.4

This version contains root certificates update for CVE-2026-111943 (eMudhra Intermediate CA Compromise), merged in oven-sh/bun#46159. See #576544.

Supersedes #574334

Things done

@liberodark liberodark added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Oct 22, 2026
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Oct 22, 2026
@happysalada

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 577354
Commit: 0d765791b09356dd5b356559c1b67c1600ca3c5b


x86_64-linux

❌ 2 packages failed to build:
  • cline
  • convertx
✅ 39 packages built:
  • livebook (beamMinimal28Packages.livebook)
  • bend2
  • bun
  • beamMinimal27Packages.livebook
  • context-mode
  • beamMinimal29Packages.livebook
  • cyberstrike
  • degit
  • filen-cli
  • ghui
  • gitlab-ci-local
  • gitlab-duo
  • balatro-mod-manager
  • beam29Packages.livebook
  • gowebly
  • atuin-desktop
  • home-assistant-custom-lovelace-modules.navbar-card
  • hunk
  • iloader
  • beam27Packages.livebook
  • kulala-core
  • beam28Packages.livebook
  • models-dev
  • mystmd
  • gleam
  • kulala-fmt
  • omp
  • surrealist
  • swagger-typescript-api
  • jxscout
  • opencode
  • zerobyte
  • handy
  • opencode-desktop
  • equibop
  • goofcord
  • windmill
  • anytype
  • vimPlugins.kulala-nvim

@happysalada

Copy link
Copy Markdown
Contributor

both failures are hash mismatch.
I think it's fine to merge this.

@baptiste0928

baptiste0928 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Investigated about these hash mismatches, this is caused by bun 1.4.4 using different folder names in node_modules/.bun. It's not breaking since these folders are resolved with symlinks, so this new bun update can run with a node_modules from the previous version.

The issue is that this changes the pinned hash of the node_modules of every package using bun. These failures are currently hidden by the binary cache since the FOD output path doesn't depend on the bun version, but it shows as soon as something builds from source (e.g. that explains the cline failure, its node_modules exceed cache limits and isn't cached).

I'm not sure what's the best option here. From what I see:

  • Ideally we should update the hash for each package. I'm not sure what's the usual process to do that and if we can automate it (with like nixpkgs-update?). Tried to do it locally on my computer but it OOMed in the middle of the process.
  • Merge as-is and rely on the binary cache to hide the issue until all the packages are fixed. Unblocks this PR that contains security fixes faster, but we'll have a bunch of technically broken packages.

@happysalada

Copy link
Copy Markdown
Contributor

This is a security update, I would say, update what you can, whatever you have finished before the oom and then let's tag the rest of the maintainers before merging so that they are aware that this is breaking

@hesprs

hesprs commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Tried to do it locally on my computer but it OOMed in the middle of the process

@baptiste0928 When I was doing #556047, I used nixpkgs-review-gha to run the review in GitHub action runners. The correct FOD hashes should be shown inside the action run logs, so that you can retrieve that directly without running all those things locally.

Each nixpkgs-review-gha takes 4+ hours for Bun even on GitHub runners by the way.

mich-murphy added a commit to mich-murphy/nix-config that referenced this pull request Oct 26, 2026
…11943)

bun embeds its own root store; 1.4.2 (locked nixpkgs and unstable HEAD) trusts
the compromised emSign intermediates (verified against the advisory checker host,
--use-system-ca does not help). 1.4.4 rejects both chains. Release hashes were
verified locally and match NixOS/nixpkgs#577354. A version guard turns this into
a no-op once nixpkgs ships >= 1.4.4.
zeroqn added a commit to zeroqn/cang that referenced this pull request Oct 27, 2026
bun embeds its own CA store instead of reading the system's, so `--use-system-ca`
cannot repair a release that trusts a compromised CA and every binary compiled
with that bun carries the same roots - the image's `bun` and the pi standalone
binary both do. Both nixpkgs inputs still pin 1.4.2, whose store trusts the
compromised eMudhra/emSign intermediates (CVE-2026-111943); 1.4.4 rejects them
(NixOS/nixpkgs#577354).

nix/pins.nix pins 1.4.4 and its published asset hashes, and nix/lib/bun-cang.nix
applies that to nixpkgs-unstable's package for both consumers. The override is
guarded on the version, so once an input ships 1.4.4 the helper returns the
input's package unchanged and there is nothing to remove later. The flake
exports the result as `packages.<system>.bun`, and `checks.bun-cang-version`
fails when the image's bun is not the pinned release.

Measured: the root store drops from 121 to 118 entries and the three eMudhra
roots (emSign ECC Root CA - G3/C3, emSign Root CA - C1) are gone; `.#container`
contains only bun-1.4.4 (0 references to 1.4.2), pi is built by bun-1.4.4, the
new image's guest reports `bun 1.4.4` with 118 roots and `pi 1.3.0`.
@06kellyjac

Copy link
Copy Markdown
Member

On convertx I got the same hash for some reason (added an x to invalidate prior hash)

image

It's a test failure

image
image image

With the old node modules FOD it seemed to build ok

image

Because we dont have a standardized fetcher for bun it'd be a fairly manual approach to updating all the hashes, since it's backwards compatible I'm open to merging this and leaving it as-is.
We can either just leave it until we need to actually update them for package updates or we could do a separate PR to update the FODs.

Just having the bun update is probably easier to backport onto stable. I'll leave this comment here until tomorrow. If there's no strong opposition I'll look to merge and backport

@happysalada

Copy link
Copy Markdown
Contributor

I support your decision to merge

@baptiste0928

Copy link
Copy Markdown
Member Author

FYI I tried using nixpkgs-review-gha to get the right hashes for all the dependent packages, but it didn't complete because the GHA runners ran out of memory. I didn't have time to try anything else.

Since this really affects only rebuilds and most packages are still available from the binary cache, I agree it's okay to merge now and update the hashes later (probably the next time each package gets an update). Especially given this contains a security update.

@06kellyjac
06kellyjac added this pull request to the merge queue Nov 2, 2026
Merged via the queue into NixOS:master with commit 54de6a0 Nov 2, 2026
34 checks passed
@baptiste0928
baptiste0928 deleted the update-bun branch November 2, 2026 11:54
@maximizeIT maximizeIT mentioned this pull request Nov 3, 2026
3 tasks done
@DuskyElf DuskyElf mentioned this pull request Nov 3, 2026
6 of 13 tasks
difro added a commit to difro/dotfiles that referenced this pull request Nov 4, 2026
… flake.lock

nixpkgs bumped bun from 1.4.2 to 1.4.4 (NixOS/nixpkgs#577354) a few hours
after opencode 2.2.5 landed with a node_modules hash computed under bun
1.4.2 (NixOS/nixpkgs#581607). bun 1.4.4's `bun install` filters optional
dependencies by the host libc, so the installed tree now differs between
Linux and Darwin and the single upstream hash matches neither
(NixOS/nixpkgs#582673). cache.nixos.org has no opencode 2.2.5 for any
platform, so home-manager switch rebuilds it locally and fails on the
mismatch.

Override the FOD hash per platform. The Darwin value comes from a local
build on this machine; the Linux value is the one reproduced in
NixOS/nixpkgs#582673 and used by PR #582675, not verified here. Drop the
overlay once nixpkgs ships a fix (#582675 or a follow-up).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants