The following commit has been merged in the openafs-stable-1_8_x branch:
commit 1e6fd4ceae1f8146a5dfa7c66330289564dbe7be
Author: Marcio Barbosa <[email protected]>
Date:   Tue Apr 5 22:39:56 2022 +0000

    afs: Ensure dirEntry->name has room for entry name
    
    Currently, the afs_dynroot_addDirEnt() function assumes that the caller
    has allocated the directory to be large enough to hold the necessary
    entry. In order to make sure that memory isn't being accidentally
    stomped, use strlcpy to truncate instead of stomping on other memory.
    That way, if the caller makes a mistake we don't silently corrupt memory.
    
    We specifically do not assert that there is no truncation or panic if
    truncation occurs, since the effect of a truncated entry in the
    dynamic AFS root volume is limited and does not justify bringing down
    the entire client.
    
    Reviewed-on: https://gerrit.openafs.org/14938
    Reviewed-by: Andrew Deason <[email protected]>
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Marcio Brito Barbosa <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>
    (cherry picked from commit aa9180652876a3ba9157776b69a6995ac4201d1b)
    
    Change-Id: I21a402bb6e20f2546c61bdabde021817dd3827d8
    Reviewed-on: https://gerrit.openafs.org/15243
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Harish Sharma <[email protected]>
    Reviewed-by: Stephan Wiesand <[email protected]>
    Tested-by: Stephan Wiesand <[email protected]>

 src/afs/afs_dynroot.c | 46 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 32 insertions(+), 14 deletions(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to