Project

General

Profile

Actions

Bug #9263

closed
VJ VJ

nfs/smb: the read/write queue limits do not hold to the record

Bug #9263: nfs/smb: the read/write queue limits do not hold to the record

Added by Victor Julien about 1 month ago. Updated 8 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Description

The queue limits added for #8791 (NFS) and #8789 (SMB1) rely on bookkeeping that does not stay within the record carrying the data:

  • NFS: the record tail and the chunk promise come from the declared size, not the record. A padded or segmented record leaves a promise armed past its end: a continuation reads into the next RPC, record slack grows the out-of-order queue, and a file whose queued data fits is truncated.
  • NFS v3: WRITE request and READ reply arguments are trusted to fit their record. A claim below the parsed extent lets file data run into the next RPC, which is then parsed as a record.
  • NFS: the partial-record scanner misreads RPCSEC_GSS records other than the integrity service, and OPEN claim types 2 and 3. It buffers toward the claim or rejects records that parse fine.
  • NFS: partial LOOKUP, READDIRPLUS and CREATE replies are bounded by max-read-size, so the handle-to-name mapping depends on that setting and on segmentation.
  • SMB: the file-data backstop runs only on gapped streams, so out-of-order data on a stream without gaps grows the queue past its bound. A rejected record still arms a file-data promise.
  • A max-tx of 0 is accepted for NFS and SMB and evicts every transaction. SMB size settings above u32 are silently truncated.

Expected behaviour

Nothing runs past its record marker, and the queue bounds hold with and without gaps.

Affected versions

master and 8.0.x.

Possible fix

Take the promise and the tail from the record; check v3 claims against the record; scan GSS records by their credential combination and OPEN claims by type; give metadata replies their own max-metadata-size; run the SMB backstop whenever an update carries data; reject a max-tx of 0.

Related: #8791, #8789.


Subtasks 1 (0 open — 1 closed)

Bug #9264: nfs/smb: the read/write queue limits do not hold to the record (8.0.x backport)ClosedVictor JulienActions

OT Updated by OISF Ticketbot about 1 month ago Actions #1

  • Subtask #9264 added

OT Updated by OISF Ticketbot about 1 month ago Actions #2

  • Label deleted (Needs backport to 8.0)

JI Updated by Jason Ish 27 days ago Actions #3

  • Status changed from In Review to Resolved

JI Updated by Jason Ish 27 days ago Actions #4

  • Status changed from Resolved to Closed

JI Updated by Jason Ish 8 days ago Actions #5

  • Private changed from Yes to No
Actions

Also available in: PDF Atom