Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OmniLanManFS
OmniLanManFS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Jobs
  • Commits

GitLab has been upgraded to 13.7.4 If you encounter any issues mail code@riscosopen.org

  • RiscOS
    • S
      Sources
    • N
      Networking
    • O
      Omni
  • Protocols
  • OmniLanManFSOmniLanManFS
  • Merge Requests
  • !3

Merged
Opened Nov 21, 2019 by Chris Collins@ccollinsContributor

Fix SMB read to not request overlength read exceeding our neg. buffer size

  • Overview 2
  • Commits 4
  • Changes 1

Per [MS-CIFS], the limit for data length in the read operation is set by MaxBufferSize (MAX_RX_BLOCK_SIZE in the source).

The problem is, in executing the read, there was no allowance for the SMB overhead, so we're asking for reads that produce packets larger than our buffer, which Samba4 is rightfully rejecting and giving us a short response to fit into the buffer we said we needed it to fit into.

In actually, Samba should abort the connection, but it responds to deal with Win2k having a similar bug.

Ref:

  • Definition of MaxBufferSize [MS-CIFS v20180912 s2.2.4.53.1, pg 282]
  • Definition of SMB_COM_READ [MS-CIFS v20180912 s2.2.4.11, pg 120]

Thanks to Rik Griffin for reporting this bug.

Edited Aug 29, 2020 by ROOL
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: RiscOS/Sources/Networking/Omni/Protocols/OmniLanManFS!3
Source branch: ticket-459-lanmanfs-corrupting-files