Patch "afs: Fix warning due to unadvanced marshalling pointer" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    afs: Fix warning due to unadvanced marshalling pointer

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     afs-fix-warning-due-to-unadvanced-marshalling-pointe.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6a1cdf298ca7e03f036321ffc8debb13eacdc317
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Tue Nov 3 16:32:58 2020 +0000

    afs: Fix warning due to unadvanced marshalling pointer
    
    [ Upstream commit c80afa1d9c3603d5eddeb8d63368823b1982f3f0 ]
    
    When using the afs.yfs.acl xattr to change an AuriStor ACL, a warning
    can be generated when the request is marshalled because the buffer
    pointer isn't increased after adding the last element, thereby
    triggering the check at the end if the ACL wasn't empty.  This just
    causes something like the following warning, but doesn't stop the call
    from happening successfully:
    
        kAFS: YFS.StoreOpaqueACL2: Request buffer underflow (36<108)
    
    Fix this simply by increasing the count prior to the check.
    
    Fixes: f5e4546347bc ("afs: Implement YFS ACL setting")
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index d21cf61d86b9f..3b19b009452a2 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -2162,6 +2162,7 @@ int yfs_fs_store_opaque_acl2(struct afs_fs_cursor *fc, const struct afs_acl *acl
 	memcpy(bp, acl->data, acl->size);
 	if (acl->size != size)
 		memset((void *)bp + acl->size, 0, size - acl->size);
+	bp += size / sizeof(__be32);
 	yfs_check_req(call, bp);
 
 	trace_afs_make_fs_call(call, &vnode->fid);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux