Project

General

Profile

Actions

Bug #22512

closed

Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)`

Bug #22512: Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)`

Added by byroot (Jean Boussier) 2 days ago. Updated 1 day ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:127358]

Description

If provided a large enough size, st_init_existing_table_with_size and Hash.new(capacity:) can overflow instead of raising, which could ultimately lead to a crash.

That being said, this bug isn't treated as a security vulnerability, because by design using an unstrusted number as a capacity open to DOS attacks regardless of the overflow.

Patch: https://github.com/ruby/ruby/pull/19773

Actions

Also available in: PDF Atom