镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

sanitize DISABLE_HARDENED_MALLOC under AT_SECURE - #80

Open
thomasbuilds wants to merge 1 commit into
GrapheneOS:17from
thomasbuilds:disable-hardened-malloc-at-secure
Open

thomasbuilds wants to merge 1 commit into
GrapheneOS:17from
thomasbuilds:disable-hardened-malloc-at-secure

Conversation

@thomasbuilds

Copy link
Copy Markdown

DISABLE_HARDENED_MALLOC isn't removed under AT_SECURE, so a process can make a program it executes across a security transition use scudo instead of hardened_malloc, such as an app executing crash_dump or the RenderScript compiler, or the shell executing run-as.

@thestinger

Copy link
Copy Markdown
Member

This will currently break each place we use this which is why we haven't done it.

@thomasbuilds

Copy link
Copy Markdown
Author

I tried to keep the existing uses working: it's still kept when the program was executed by init (/proc/self/attr/prev is u:r:init:s0), which should cover the disable_hardened_malloc service option used for zygote_compat. As far as I can tell, the only other place it's set is exec spawning, and since the zygote executes app_process64 and zygote_next without a domain transition, AT_SECURE isn't set there. Children of apps with it disabled should still get scudo via the GrapheneOS SELinux flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants