Bug 1557445 - [nfs-ganesha]: ensure correctness of RADOS OMAP kv fetched from RADOS
Summary: [nfs-ganesha]: ensure correctness of RADOS OMAP kv fetched from RADOS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z3
: 3.0
Assignee: Matt Benjamin (redhat)
QA Contact: ceph-qe-bugs
Aron Gunn
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-16 15:14 UTC by Ram Raja
Modified: 2020-10-08 16:06 UTC (History)
13 users (show)

Fixed In Version: RHEL: nfs-ganesha-2.5.5-5.el7cp Ubuntu: nfs-ganesha_2.5.5-8redhat1xenial
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-15 18:20:29 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1563 0 None None None 2018-05-15 18:21:15 UTC

Description Ram Raja 2018-03-16 15:14:25 UTC
Description of problem:
NFS-Ganesha uses RADOS OMAP keyvalue interface to store NFS client recovery data. OSP 13 Manila setup relies on this feature of NFS-Ganesha to make sure NFS-Ganesha is highly available in active/passive configuration.

The following commit ensures the correctness when fetching data from OMAP key-value interface.

Author: Jeff Layton <jlayton>
Date:   Fri Mar 2 06:47:28 2018 -0500

    RADOS_KV: do copy in rados_kv_get before releasing read op
    
    Jason Dillaman pointed out that we're relying on these strings to
    remain valid after releasing the read op in rados_kv_get. That's not
    guaranteed to work.
    
    Change rados_kv_get to copy the string into the destination buffer
    before releasing the op.
    
    Change-Id: Ia11e10a7ca113876d8ba4f1a5fa2851fa683d1a8
    Reported-by: Jason Dillaman <jdillama>
    Signed-off-by: Jeff Layton <jlayton>

The patch is in upstream NFS-Ganesha v2.7-dev3
Need to backport to downstream NFS-Ganesha in RHCS

Version-Release number of selected component (if applicable):
NFS-Ganesha in RHCS 3.0.z1 and 3.0

It's not easy to write a reproducer for this issue. It's a safety/correctness issue.

Comment 4 Ram Raja 2018-03-16 15:16:29 UTC
Commit ID was missing.

commit 7695a6c24bec0de58fb287856747534bb0103d4e
Author: Jeff Layton <jlayton>
Date:   Fri Mar 2 06:47:28 2018 -0500

    RADOS_KV: do copy in rados_kv_get before releasing read op
    
    Jason Dillaman pointed out that we're relying on these strings to
    remain valid after releasing the read op in rados_kv_get. That's not
    guaranteed to work.
    
    Change rados_kv_get to copy the string into the destination buffer
    before releasing the op.
    
    Change-Id: Ia11e10a7ca113876d8ba4f1a5fa2851fa683d1a8
    Reported-by: Jason Dillaman <jdillama>
    Signed-off-by: Jeff Layton <jlayton>

https://github.com/nfs-ganesha/nfs-ganesha/commit/7695a6c24bec0de58fb287856747534bb0103d4e

Comment 22 errata-xmlrpc 2018-05-15 18:20:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1563


Note You need to log in before you can comment on or make changes to this bug.