]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs_proxy: fix userperm pointer decoding for older protocols 65320/head
authorXavi Hernandez <xhernandez@gmail.com>
Mon, 1 Sep 2025 12:43:26 +0000 (14:43 +0200)
committerXavi Hernandez <xhernandez@gmail.com>
Tue, 9 Sep 2025 13:12:35 +0000 (15:12 +0200)
The random data used to decode pointers coming from the old protocol was
taken from the client instead of using the global_random data, which is
the correct one.

Fixes: https://tracker.ceph.com/issues/72800
Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
src/libcephfs_proxy/libcephfsd.c

index 503019dc62c44c95f037f3bb8bb35bc0d03dc130..64a3f888cd8653a728c5dffdff6236d662807d46 100644 (file)
@@ -89,7 +89,7 @@ static int32_t validate_perms(proxy_client_t *client, embedded_perms_t *embed,
 
        if ((client->neg.v1.enabled & PROXY_FEAT_EMBEDDED_PERMS) == 0) {
                *embedded = false;
-               return ptr_check(&client->random, embed->ptr, (void **)pperms);
+               return ptr_check(&global_random, embed->ptr, (void **)pperms);
        }
 
        perms = ceph_userperm_new(embed->uid, embed->gid, count,