[#115984] [Ruby master Misc#20107] Update required Oracle Solaris Studio version to 12.5 — "kddnewton (Kevin Newton) via ruby-core" <ruby-core@...>

Issue #20107 has been reported by kddnewton (Kevin Newton).

7 messages 2024/01/02

[#115985] [Ruby master Feature#20108] Introduction of Happy Eyeballs Version 2 (RFC8305) in Socket.tcp — "shioimm (Misaki Shioi) via ruby-core" <ruby-core@...>

Issue #20108 has been reported by shioimm (Misaki Shioi).

14 messages 2024/01/02

[#116028] [Ruby master Feature#20152] mkmf / extconf: Add a proper way to not compile the extension — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #20152 has been reported by byroot (Jean Boussier).

21 messages 2024/01/05

[#116039] [Ruby master Bug#20154] aarch64: configure overrides `-mbranch-protection` if it was set in CFLAGS via environment — "jprokop (Jarek Prokop) via ruby-core" <ruby-core@...>

Issue #20154 has been reported by jprokop (Jarek Prokop).

11 messages 2024/01/05

[#116041] [Ruby master Bug#20155] Using value of rb_fiber_scheduler_current() crashes Ruby — "paddor (Patrik Wenger) via ruby-core" <ruby-core@...>

Issue #20155 has been reported by paddor (Patrik Wenger).

12 messages 2024/01/05

[#116065] [Ruby master Feature#20160] rescue keyword for case expressions — "lloeki (Loic Nageleisen) via ruby-core" <ruby-core@...>

Issue #20160 has been reported by lloeki (Loic Nageleisen).

9 messages 2024/01/08

[#116083] [Ruby master Feature#20163] Introduce #bit_count method on Integer — "garrison (Garrison Jensen) via ruby-core" <ruby-core@...>

Issue #20163 has been reported by garrison (Garrison Jensen).

25 messages 2024/01/08

[#116114] [Ruby master Bug#20169] `GC.compact` can raises `EFAULT` on IO — "ko1 (Koichi Sasada) via ruby-core" <ruby-core@...>

Issue #20169 has been reported by ko1 (Koichi Sasada).

14 messages 2024/01/09

[#116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly — "mwaldvogel (Michael Waldvogel) via ruby-core" <ruby-core@...>

Issue #20172 has been reported by mwaldvogel (Michael Waldvogel).

9 messages 2024/01/09

[#116182] [Ruby master Bug#20180] Inconsistent evaluation of `**{}` depending on position in array — "ozydingo (Andrew Schwartz) via ruby-core" <ruby-core@...>

Issue #20180 has been reported by ozydingo (Andrew Schwartz).

8 messages 2024/01/12

[#116203] [Ruby master Bug#20185] String#ascii_only? buggy in ruby 3.3 — "chucke (Tiago Cardoso) via ruby-core" <ruby-core@...>

SXNzdWUgIzIwMTg1IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGNodWNrZSAoVGlhZ28gQ2FyZG9zbyku

7 messages 2024/01/14

[#116223] [Ruby master Bug#20188] `Module#const_source_location` returns wrong information when real constant was defined but autoload is still ongoing — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #20188 has been reported by byroot (Jean Boussier).

32 messages 2024/01/16

[#116315] [Ruby master Misc#20193] DevMeeting-2024-02-14 — "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>

Issue #20193 has been reported by mame (Yusuke Endoh).

16 messages 2024/01/19

[#116347] [Ruby master Bug#20197] Postponed job invocations are significantly reduced in Ruby 3.3 — "osyoyu (Daisuke Aritomo) via ruby-core" <ruby-core@...>

Issue #20197 has been reported by osyoyu (Daisuke Aritomo).

8 messages 2024/01/20

[#116370] [Ruby master Bug#20203] `TestEnumerable` test failures with GCC 14 — "vo.x (Vit Ondruch) via ruby-core" <ruby-core@...>

Issue #20203 has been reported by vo.x (Vit Ondruch).

13 messages 2024/01/22

[#116382] [Ruby master Feature#20205] Enable `frozen_string_literal` by default — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #20205 has been reported by byroot (Jean Boussier).

77 messages 2024/01/23

[#116395] [Ruby master Bug#20207] Segmentation fault for a regexp containing positive and negative lookaheads — "Sundeep (Sundeep Agarwal) via ruby-core" <ruby-core@...>

Issue #20207 has been reported by Sundeep (Sundeep Agarwal).

7 messages 2024/01/24

[#116399] [Ruby master Bug#20208] Net::HTTP errors with Errno::EAFNOSUPPORT when setting local_host with Addrinfo — "jprokop (Jarek Prokop) via ruby-core" <ruby-core@...>

Issue #20208 has been reported by jprokop (Jarek Prokop).

9 messages 2024/01/24

[#116435] [Ruby master Misc#20210] Invalid source encoding raises ArgumentError, not SyntaxError — "kddnewton (Kevin Newton) via ruby-core" <ruby-core@...>

Issue #20210 has been reported by kddnewton (Kevin Newton).

8 messages 2024/01/25

[#116456] [Ruby master Feature#20215] Introduce `IO#readable?` — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

Issue #20215 has been reported by ioquatix (Samuel Williams).

17 messages 2024/01/26

[#116460] [Ruby master Bug#20218] aset/masgn/op_asgn with keyword arguments — "jeremyevans0 (Jeremy Evans) via ruby-core" <ruby-core@...>

Issue #20218 has been reported by jeremyevans0 (Jeremy Evans).

18 messages 2024/01/27

[#116491] [Ruby master Bug#20225] Inconsistent behavior of regex matching for a regex has a null loop — "make_now_just (Hiroya Fujinami) via ruby-core" <ruby-core@...>

Issue #20225 has been reported by make_now_just (Hiroya Fujinami).

10 messages 2024/01/30

[#116493] [Ruby master Bug#20226] Inconsistent Sort results on 3.3.0 compared to previous versions — "omerby (Omer Ben Yosef) via ruby-core" <ruby-core@...>

Issue #20226 has been reported by omerby (Omer Ben Yosef).

14 messages 2024/01/30

[ruby-core:116186] [Ruby master Bug#20178] Out of bounds stack read on Array#first when built with -O0

From: "jhawthorn (John Hawthorn) via ruby-core" <ruby-core@...>
Date: 2024-01-12 20:57:27 UTC
List: ruby-core #116186
Issue #20178 has been updated by jhawthorn (John Hawthorn).


Yes, this is already tagged as `3.3: REQUIRED`

----------------------------------------
Bug #20178: Out of bounds stack read on Array#first when built with -O0
https://bugs.ruby-lang.org/issues/20178#change-106200

* Author: jhawthorn (John Hawthorn)
* Status: Closed
* Priority: Normal
* ruby -v: 3.3.0
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: REQUIRED
----------------------------------------
https://github.com/ruby/ruby/pull/9499

Previously on builds with optimizations disabled, we could end up with an out of bounds read trying to access a non-existent local variable in the compiled `Primitive.cexpr!`.

This occurred only when we had all of:
* built with `-O0`
* Leaf builtin
* `Primitive.mandatory_only`
* "no args builtin", called by [vm_call_single_noarg_inline_builtin](https://github.com/ruby/ruby/pull/7486)
* The stack is escaped to the heap via binding or a proc
 
This is because `mk_builtin_loader` generated reads for all locals regardless of whether they were used and in the case we generated a mandatory_only iseq that would include more variables than were actually available.

On optimized builds, the invalid accesses would be optimized away, and this also was often unnoticed as the invalid access would just hit another part of the stack unless it had been escaped to the heap. However we should fix (and backport) this both because and so that we can use ASAN and debug builds.


---

``` ruby
def foo
  binding
  [].first
end

foo
foo
```

```
=================================================================
==1542964==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000045fc8 at pc 0x55cb2958b7d0 bp 0x7ffcdc9f1f00 sp 0x7ffcdc9f1ef0
READ of size 8 at 0x603000045fc8 thread T0
    #0 0x55cb2958b7cf in rb_vm_lvar /home/jhawthorn/src/ruby/builtin.h:103
    #1 0x55cb295ab586 in builtin_inline_class_104 /home/jhawthorn/src/ruby/array.rbinc:14
    #2 0x55cb29b2243e in builtin_invoker0 /home/jhawthorn/src/ruby/vm_insnhelper.c:6724
    #3 0x55cb29b09556 in vm_call_single_noarg_inline_builtin /home/jhawthorn/src/ruby/vm_insnhelper.c:2931
    #4 0x55cb29b1d112 in vm_sendish /home/jhawthorn/src/ruby/vm_insnhelper.c:5581
    #5 0x55cb29b34533 in vm_exec_core /home/jhawthorn/src/ruby/insns.def:834
    #6 0x55cb29b6c9a3 in rb_vm_exec /home/jhawthorn/src/ruby/vm.c:2487
    #7 0x55cb29b6f338 in rb_iseq_eval_main /home/jhawthorn/src/ruby/vm.c:2753
    #8 0x55cb296f7188 in rb_ec_exec_node /home/jhawthorn/src/ruby/eval.c:287
    #9 0x55cb296f74e4 in ruby_run_node /home/jhawthorn/src/ruby/eval.c:328
    #10 0x55cb29587d51 in rb_main main.c:39
    #11 0x55cb29587eb1 in main main.c:58
    #12 0x7f3295558ccf  (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
    #13 0x7f3295558d89 in __libc_start_main (/usr/lib/libc.so.6+0x27d89) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
    #14 0x55cb29587bb4 in _start (/home/jhawthorn/src/ruby/miniruby+0x1a7bb4) (BuildId: acaf2fc9526d3e1423a2fcbd072ee6aeb3e5c4c6)

0x603000045fc8 is located 8 bytes before 32-byte region [0x603000045fd0,0x603000045ff0)
allocated by thread T0 here:
    #0 0x7f32958e1359 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x55cb2975348a in objspace_xmalloc0 /home/jhawthorn/src/ruby/gc.c:12625
    #2 0x55cb29753940 in ruby_xmalloc2_body /home/jhawthorn/src/ruby/gc.c:12872
    #3 0x55cb29759643 in ruby_xmalloc2 /home/jhawthorn/src/ruby/gc.c:14473
    #4 0x55cb29b62b80 in vm_make_env_each /home/jhawthorn/src/ruby/vm.c:977
    #5 0x55cb29b62dc0 in vm_make_env_object /home/jhawthorn/src/ruby/vm.c:1010
    #6 0x55cb29b65271 in rb_vm_make_binding /home/jhawthorn/src/ruby/vm.c:1433
    #7 0x55cb298cbdb5 in rb_binding_new /home/jhawthorn/src/ruby/proc.c:347
    #8 0x55cb298cbdc8 in rb_f_binding /home/jhawthorn/src/ruby/proc.c:397
    #9 0x55cb29b0ca60 in ractor_safe_call_cfunc_0 /home/jhawthorn/src/ruby/vm_insnhelper.c:3306
    #10 0x55cb29b0eb89 in vm_call_cfunc_with_frame_ /home/jhawthorn/src/ruby/vm_insnhelper.c:3490
    #11 0x55cb29b0f149 in vm_call_cfunc_with_frame /home/jhawthorn/src/ruby/vm_insnhelper.c:3518
    #12 0x55cb29b1d112 in vm_sendish /home/jhawthorn/src/ruby/vm_insnhelper.c:5581
    #13 0x55cb29b34533 in vm_exec_core /home/jhawthorn/src/ruby/insns.def:834
    #14 0x55cb29b6c9a3 in rb_vm_exec /home/jhawthorn/src/ruby/vm.c:2487
    #15 0x55cb29b6f338 in rb_iseq_eval_main /home/jhawthorn/src/ruby/vm.c:2753
    #16 0x55cb296f7188 in rb_ec_exec_node /home/jhawthorn/src/ruby/eval.c:287
    #17 0x55cb296f74e4 in ruby_run_node /home/jhawthorn/src/ruby/eval.c:328
    #18 0x55cb29587d51 in rb_main main.c:39
    #19 0x55cb29587eb1 in main main.c:58
    #20 0x7f3295558ccf  (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jhawthorn/src/ruby/builtin.h:103 in rb_vm_lvar
Shadow bytes around the buggy address:
  0x603000045d00: fd fd fd fa fa fa fd fd fd fa fa fa 00 00 00 00
  0x603000045d80: fa fa 00 00 04 fa fa fa fd fd fd fd fa fa 00 00
  0x603000045e00: 00 00 fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa
  0x603000045e80: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 00
  0x603000045f00: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
=>0x603000045f80: 00 00 fa fa 00 00 00 00 fa[fa]00 00 00 00 fa fa
  0x603000046000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x603000046080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x603000046100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x603000046180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x603000046200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==1542964==ABORTING
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- [email protected]
 To unsubscribe send an email to [email protected]
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

In This Thread