Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Issue 2483953003: [Android] Block __NR_getsockname via EPERM rather than SIGSYS. (Closed)

Created:
4 years, 1 month ago by Robert Sesek
Modified:
4 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, rickyz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Block __NR_getsockname via EPERM rather than SIGSYS. While EPERM is not a documented errno return value for getsockname, some systems issue this syscall and we do not want to permit it. Use EPERM to block it instead of the baseline-policy SIGSYS so that the process does not crash. (Note that SELinux would return EACCES for a neverallow getattr on socket files, so EPERM is a useful differentiator). This also fixes a bug in the i386 policy that attempts to restrict the __NR_socketcall arguments. But since those reside in a userspace struct, they are not safe to consult. BUG=655300 R=rickyz@chromium.org Committed: https://crrev.com/1f6acfe7dd08165baad36302b4388248e2854936 Cr-Commit-Position: refs/heads/master@{#430422}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc View 3 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Robert Sesek
Any thoughts on this? I know we try and avoid not returning non-documented errno, but ...
4 years, 1 month ago (2016-11-07 23:00:21 UTC) #1
rickyz (no longer on Chrome)
lgtm
4 years, 1 month ago (2016-11-07 23:01:49 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2483953003/1
4 years, 1 month ago (2016-11-07 23:12:59 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-07 23:50:18 UTC) #5
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 23:53:40 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1f6acfe7dd08165baad36302b4388248e2854936
Cr-Commit-Position: refs/heads/master@{#430422}

Powered by Google App Engine
This is Rietveld 408576698