My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 203976: libminijail passes through positive errno values when rest of returns are -ve
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Moved from:  issue chromium-os:20903
Owner:  ----
Closed:  Sep 2011


Sign in to add a comment
 
Project Member Reported by keesc...@chromium.org, Sep 27, 2011
$ grep return libminijail.c
...

      return -EINVAL;
        return -EINVAL;
        return -EINVAL;
        return -EINVAL;
  return 0;
    return errno;
    return errno;
  return 0;
    return ret;
  return ret;
    return -EINVAL;
    return -E2BIG;
    return -ENOMEM;
...

It looks like all the "return errno" cases should be "return -errno" instead.
Sep 28, 2011
#1 bugdroid1@chromium.org
Commit: e805d37c95696e080dc421fe777df80c8f569fdb
 Email: keescook@chromium.org

libminijail: pass-through errno should be negative

The errno values in the rest of libminijail use negative errno values. This
makes sure that the passed-through errno values are negative as well.

BUG=chromium-os:20903
TEST=Built for x86-alex and did a full image build & boot, ran okay as:
  sudo minijail0 -pu chronos /bin/ls
 and correctly failed (exit code 253) with:
  sudo minijail0 -S /dev/null /bin/ls

Change-Id: Ifac27468a21820ae342522c749c76f2045b630c3
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8394
Reviewed-by: Will Drewry <wad@chromium.org>

M	libminijail.c
Oct 14, 2011
#2 keesc...@chromium.org
(No comment was entered for this change.)
Status: Verified
Oct 17, 2011
#3 or...@chromium.org
Claiming work for iteration-40
Labels: Iteration-40
Jan 9, 2012
#4 chromeos...@chromium.org
(No comment was entered for this change.)
Labels: FixedIn-1099.0.0
Jan 20, 2012
#5 chromeos...@chromium.org
(No comment was entered for this change.)
Labels: FixedInIndex-25
Mar 6, 2013
#6 lafo...@google.com
(No comment was entered for this change.)
Labels: OS-Chrome
Mar 9, 2013
#7 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Area-Platform Cr-OS-Kernel
Sign in to add a comment

Powered by Google Project Hosting