Skip to content

Executing a shell command with redirected IO stops after ~4kb. #352

Description

@gabevenberg

Trying to transfer a file over base64 (target doesnt have rz or anything like that, thankfully openssl has a base64 en/de/coder), and any large file has its input stop at about the same point, ~4k bytes. After that, the stream stops, as if there was nothing more in standard input.

Steps:

  • obtain/generate a file that is over 4.161kb when b64 encoded (I used some random lockfiles I found on my system)
  • login through serial to another linux system
  • run cat > tmp
  • ctrl-t ctrl-R openssl enc -base64 <$FILE
  • the stream will stop after less than a second.
  • ctrl-c
  • note the file size
  • run openssl enc -base64 -d <tmp > tmp2, and note the truncated file
  • run again, note that the transfer stops at the same point in the file, though the exact point can be different for different files.

Id actually be interested in a reproduction, as I only have acess to a single embedded linux device to test this with, though I also see this with a 'null modem' (a wire shorting the 2 serial lines)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions