{"action":"closed","issue":{"url":"https://api.github.com/repos/snapview/tungstenite-rs/issues/33","repository_url":"https://api.github.com/repos/snapview/tungstenite-rs","labels_url":"https://api.github.com/repos/snapview/tungstenite-rs/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/snapview/tungstenite-rs/issues/33/comments","events_url":"https://api.github.com/repos/snapview/tungstenite-rs/issues/33/events","html_url":"https://github.com/snapview/tungstenite-rs/issues/33","id":337233361,"node_id":"MDU6SXNzdWUzMzcyMzMzNjE=","number":33,"title":"Integer overflow in Frame::parse","user":{"login":"bluetech","id":1223550,"node_id":"MDQ6VXNlcjEyMjM1NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1223550?v=4","gravatar_id":"","url":"https://api.github.com/users/bluetech","html_url":"https://github.com/bluetech","followers_url":"https://api.github.com/users/bluetech/followers","following_url":"https://api.github.com/users/bluetech/following{/other_user}","gists_url":"https://api.github.com/users/bluetech/gists{/gist_id}","starred_url":"https://api.github.com/users/bluetech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluetech/subscriptions","organizations_url":"https://api.github.com/users/bluetech/orgs","repos_url":"https://api.github.com/users/bluetech/repos","events_url":"https://api.github.com/users/bluetech/events{/privacy}","received_events_url":"https://api.github.com/users/bluetech/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-30T18:17:43Z","updated_at":"2018-07-02T16:25:33Z","closed_at":"2018-07-02T16:25:33Z","author_association":"CONTRIBUTOR","body":"The following crafted input\r\n\r\n```rust\r\n#[test]\r\nfn parse_overflow() {\r\n    let mut raw: Cursor<Vec<u8>> = Cursor::new(vec![\r\n        0b1000_0011, 0b1111_1111, 0b1111_1111, 0b1111_1111,\r\n        0b1111_1111, 0b1111_1111, 0b1111_1111, 0b1111_1111,\r\n        0b1111_1111, 0b1111_1111, 0b0000_0000, 0b0000_0000,\r\n        0b0000_0000, 0b0000_0000,\r\n    ]);\r\n    // Check that it doesn't panic.\r\n    let _ = Frame::parse(&mut raw);\r\n}\r\n```\r\n\r\nresults in\r\n\r\n```\r\n---- protocol::frame::frame::tests::parse_overflow stdout ----\r\n\tthread 'protocol::frame::frame::tests::parse_overflow' panicked at 'attempt to add with overflow', src/protocol/frame/frame.rs:347:19\r\n```\r\n\r\nCode:\r\n\r\n```rust\r\nif size < length + header_length {\r\n    cursor.set_position(initial);\r\n    return Ok(None)\r\n}\r\n```"}}
{"actor":{"display_login":"agalakhov"}}