[ruby-core:127358] [Ruby Bug#22512] Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)`
Issue #22512 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #22512: Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)` https://bugs.ruby-lang.org/issues/22512 * Author: byroot (Jean Boussier) * Status: Open * Backport: 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- 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 -- https://bugs.ruby-lang.org/
Issue #22512 has been updated by byroot (Jean Boussier). Backport PRs: - 4.0 https://github.com/ruby/ruby/pull/19775 - 3.4 https://github.com/ruby/ruby/pull/19776 ---------------------------------------- Bug #22512: Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)` https://bugs.ruby-lang.org/issues/22512#change-119792 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- 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 -- https://bugs.ruby-lang.org/
Issue #22512 has been updated by tenderlovemaking (Aaron Patterson). Backport changed from 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: WONTFIX, 3.4: REQUIRED, 4.0: DONE ruby_4_0 commit:67ddc4a20c merged revision(s) commit:165bb8173f. ---------------------------------------- Bug #22512: Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)` https://bugs.ruby-lang.org/issues/22512#change-119870 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.3: WONTFIX, 3.4: REQUIRED, 4.0: DONE ---------------------------------------- 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 -- https://bugs.ruby-lang.org/
Issue #22512 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.3: WONTFIX, 3.4: REQUIRED, 4.0: DONE to 3.3: WONTFIX, 3.4: DONE, 4.0: DONE Merged into `ruby_3_4` at https://github.com/ruby/ruby/commit/d6ad8deda7de9d8f960aa9fcae9d1af32a2a88df. ---------------------------------------- Bug #22512: Overflow in `st_init_existing_table_with_size` / `Hash.new(capacity:)` https://bugs.ruby-lang.org/issues/22512#change-119933 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.3: WONTFIX, 3.4: DONE, 4.0: DONE ---------------------------------------- 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 -- https://bugs.ruby-lang.org/
participants (3)
-
byroot (Jean Boussier) -
nagachika (Tomoyuki Chikanaga) -
tenderlovemaking (Aaron Patterson)