Skip to content

Stack buffer overflow #272

Description

@zottce

There is a critical bug with CongestionHandler.
You can easily get STATUS_STACK_BUFFER_OVERRUN error on Windows with like 3000 virtual connections. Also this can be reproduced on Linux servers. Today I have bad feedback because my application causes crashes on real working servers.

This test is able to show what I'm talking about

    #[test]
    fn billion_virtual_connections() {
        let mut connections = Vec::with_capacity(3000);
        
        for i in 0..connections.capacity() {
            connections.push(create_virtual_connection());
        }
    }

Error message I got from cargo:

memory allocation of 1572840 bytes failederror: test failed, to rerun pass '--lib'

Caused by:
  process didn't exit successfully: `D:\sources\rust\laminar\target\debug\deps\laminar-c1edf1cab4d7715a.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions