OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_6-11-g179a418

Gerrit Code Review
Fri, 24 Jul 2020 08:58:14 -0400

The following commit has been merged in the openafs-stable-1_8_x branch:
commit 179a418ea5063785a23e4faf35134f063a6f3e1c
Author: Andrew Deason <>
Date:   Fri Mar 13 13:00:35 2020 -0500

    LINUX: Properly revert creds in osi_UFSTruncate
    Commit cd3221d3 (Linux: use override_creds when available) caused us
    to force the current process's creds to the creds of afsd during
    osi_file.c file ops, to avoid access errors in some cases.
    However, in osi_UFSTruncate, one code path was missed to revert our
    creds back to the original user's creds: when the afs_osi_Stat call
    fails or deems the truncate unnecessary. In this case, the calling
    process keeps the creds for afsd after osi_UFSTruncate returns,
    causing our subsequent access-checking code to think that the current
    process is in the same context as afsd (typically uid 0 without a
    This can cause the calling process to appear to transiently have the
    same access as non-pag uid 0; typically this will be unauthenticated
    access, but could be authenticated if uid 0 has tokens.
    To fix this, modify the early return in osi_UFSTruncate to go through
    a 'goto done' destructor instead, and make sure we revert our creds in
    that destructor.
    Thanks to for finding and helping reproduce the
    Tested-by: BuildBot <>
    Reviewed-by: Benjamin Kaduk <>
    Reviewed-by: Jeffrey Hutzelman <>
    Reviewed-by: Cheyenne Wills <>
    Tested-by: Cheyenne Wills <>
    (cherry picked from commit 57b4f4f9be1e25d5609301c10f717aff32aef676)
    Change-Id: I714eb2dea9645ffe555f26b5d69707a7afbe8d81
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Jeffrey Hutzelman <>
    Tested-by: BuildBot <>
    Reviewed-by: Michael Meffie <>
    Reviewed-by: Stephan Wiesand <>

 src/afs/LINUX/osi_file.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

OpenAFS Master Repository