In versions of mruby up to and including 1.4.0, an integer overflow exists in src/vm.c::mrb_vm_exec() when handling OP_GETUPVAR in the presence of deep scope nesting, resulting in a use-after-free. An attacker that can cause Ruby code to be run can use this to possibly execute arbitrary code.
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Link | Tags |
---|---|
https://github.com/mruby/mruby/issues/3995 | issue tracking exploit third party advisory |
https://github.com/mruby/mruby/commit/1905091634a6a2925c911484434448e568330626 | third party advisory patch |
https://lists.debian.org/debian-lts-announce/2022/05/msg00006.html | third party advisory mailing list |