Thanks to visit codestin.com
Credit goes to github.com

Skip to content

High CPU when file being uploaded is rotated #1125

@mkrokosz

Description

@mkrokosz

If a file being uploaded is rotated, a race condition in object_put() between opening the stream and calculating the length will cause this function to get stuck in a while loop because it will be trying to read more bytes then exist in the file which this function opens. When this occurs, read will return 0 bytes causing this function to get stuck into a while loop causing the script to peg a single core to 100% cpu.

chunk = f.read(min(8192, size_left))

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions