Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crash in seccomp sandbox with glibc 2.34 #31091

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

deepak1556
Copy link
Member

Description of Change

Refs https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468

Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1244383
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1213452

The fix is available in Electron >= 14

Checklist

Release Notes

Notes: fix crash in seccomp sandbox with glibc 2.34

@deepak1556 deepak1556 requested a review from a team as a code owner September 23, 2021 12:01
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Sep 23, 2021
@deepak1556 deepak1556 added 13-x-y backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes labels Sep 23, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Sep 23, 2021
@deepak1556 deepak1556 added new-pr 🌱 PR opened in the last 24 hours target/12-x-y labels Sep 23, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Sep 23, 2021
@deepak1556 deepak1556 merged commit 993ecb5 into 13-x-y Sep 23, 2021
@deepak1556 deepak1556 deleted the robo/update_seccomp_bpf_13_x_y branch September 23, 2021 20:53
@release-clerk
Copy link

release-clerk bot commented Sep 23, 2021

Release Notes Persisted

fix crash in seccomp sandbox with glibc 2.34

@trop
Copy link
Contributor

trop bot commented Sep 23, 2021

I have automatically backported this PR to "12-x-y", please check out #31096

@darix
Copy link

darix commented Sep 24, 2021

do we have any ETA for a new 13.x release? TIA

@deepak1556
Copy link
Member Author

This is now released in v13.5.0

@filfreire filfreire mentioned this pull request Jan 4, 2022
1 task
gentoo-bot pushed a commit to gentoo/glibc that referenced this pull request Feb 3, 2022
We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
compatibility with applications using older Electron.

Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will
revert back to always using clone3.

This was impacting e.g. Discord and Skype. This patch stops glibc from using
clone3 internally (which is the only real use of it) and falls back to the old
behaviour.

Specifically, we want electron/electron#31091
to work its way downstream to various Electron applications.

https://bugs.gentoo.org/819045
https://bugs.gentoo.org/827386

https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch

This is the same as the patch that was considered but ultimately rejected
for 2.34 because Docker got sorted out in time:
https://patchwork.ozlabs.org/project/glibc/patch/[email protected]/.

Signed-off-by: Sam James <[email protected]>
Subject: Linux sandbox: return ENOSYS for clone3

Because clone3 uses a pointer argument rather than a flags argument, we
cannot examine the contents with seccomp, which is essential to
Copy link

@lfmunoz lfmunoz Jan 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"with seccomp enabled" would better . The way is written makes me think seccomp is used to examine contents

zatrazz pushed a commit to zatrazz/glibc that referenced this pull request Oct 8, 2024
This patch was originally carried in Gentoo to make clone3
optional to avoid breakage for CEF/steam/zoom, and others.

Gentoo made clone3 mandatory but ChromeOS is not there yet,
so we carry this trivial patch to allow us to keep clone3
disabled for a while longer.

See b:288928916 which is tracking the clone3 migration.

Original commit message:

We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
compatibility with applications using older Electron.

Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will
revert back to always using clone3.

This was impacting e.g. Discord and Skype. This patch stops glibc from using
clone3 internally (which is the only real use of it) and falls back to the old
behaviour.

Specifically, we want electron/electron#31091
to work its way downstream to various Electron applications.

https://bugs.gentoo.org/819045
https://bugs.gentoo.org/827386

https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch

This is the same as the patch that was considered but ultimately rejected
for 2.34 because Docker got sorted out in time:
https://patchwork.ozlabs.org/project/glibc/patch/[email protected]/.

Signed-off-by: Sam James <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
13-x-y backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants