New Ruby versions were released today to fix some serious security
vulnerabilities. Announcement at:
https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/
The phrase "can be used to trigger RCE in some scenarios" is repeated
multiple times.
Tested briefly on amd64. Due to the severity of the issues, I plan
on committing this shortly.
Best,
Jeremy
Index: 3.4/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.4/Makefile,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 Makefile
--- 3.4/Makefile 24 Oct 2026 06:48:51 -0000 1.17
+++ 3.4/Makefile 19 Nov 2026 01:06:40 -0000
@@ -1,4 +1,4 @@
-VERSION = 3.4.12
+VERSION = 3.4.13
DISTNAME = ruby-${VERSION}
PKGNAME-main = ruby-${VERSION}
PKGNAME-ri_docs = ruby${BINREV}-ri_docs-${VERSION}
Index: 3.4/distinfo
===================================================================
RCS file: /cvs/ports/lang/ruby/3.4/distinfo,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 distinfo
--- 3.4/distinfo 24 Oct 2026 06:48:51 -0000 1.12
+++ 3.4/distinfo 19 Nov 2026 01:06:40 -0000
@@ -1,2 +1,2 @@
-SHA256 (ruby-3.4.12.tar.gz) = Xl2FrZOwrczLrUdzNoD0iSvQB44zQkN/e6vOAcGHJHk=
-SIZE (ruby-3.4.12.tar.gz) = 22498017
+SHA256 (ruby-3.4.13.tar.gz) = 0NO/PdjCJKPDt+zYFqDxssvPT4e1r8vb6R0/7xd/NRo=
+SIZE (ruby-3.4.13.tar.gz) = 22523151
Index: 3.4/patches/patch-compile_c
===================================================================
RCS file: /cvs/ports/lang/ruby/3.4/patches/patch-compile_c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-compile_c
--- 3.4/patches/patch-compile_c 26 Sep 2026 00:07:12 -0000 1.3
+++ 3.4/patches/patch-compile_c 19 Nov 2026 01:06:40 -0000
@@ -4,7 +4,7 @@ segfaults.
Index: compile.c
--- compile.c.orig
+++ compile.c
-@@ -3284,6 +3284,10 @@ static int
+@@ -3307,6 +3307,10 @@ static int
iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int
do_tailcallopt)
{
INSN *const iobj = (INSN *)list;
Index: 3.4/patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/ruby/3.4/patches/patch-configure,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 patch-configure
--- 3.4/patches/patch-configure 3 Jul 2026 00:01:22 -0000 1.6
+++ 3.4/patches/patch-configure 19 Nov 2026 01:06:40 -0000
@@ -10,7 +10,7 @@ so ports don't have to be bumped when Op
Index: configure
--- configure.orig
+++ configure
-@@ -11057,7 +11057,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.b
+@@ -11283,7 +11283,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.b
if test "x$rb_cv_libunwind_broken_ra_signing" = "xno"
then :
@@ -19,7 +19,7 @@ Index: configure
do :
# Try these flags in the _prepended_ position - i.e. we want
to try building a program
-@@ -31726,7 +31726,7 @@ main (void)
+@@ -32518,7 +32518,7 @@ main (void)
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
@@ -28,7 +28,7 @@ Index: configure
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -A -n" >&5
-@@ -32275,7 +32275,7 @@ fi
+@@ -33080,7 +33080,7 @@ fi
;; #(
openbsd*|mirbsd*) :
@@ -37,12 +37,12 @@ Index: configure
;; #(
solaris*) :
-@@ -34470,7 +34470,7 @@ then :
-
- else $as_nop
+@@ -35343,7 +35343,7 @@ then :
+ else case e in #(
+ e)
- arch="${target_cpu}-${target_os}"
+ arch="${target_cpu}-openbsd"
-
+ ;;
+ esac
fi
- printf "%s\n" "#define RUBY_PLATFORM \"$arch\"" >>confdefs.h
Index: 3.4/pkg/PLIST-ri_docs
===================================================================
RCS file: /cvs/ports/lang/ruby/3.4/pkg/PLIST-ri_docs,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 PLIST-ri_docs
--- 3.4/pkg/PLIST-ri_docs 3 Jul 2026 00:01:22 -0000 1.6
+++ 3.4/pkg/PLIST-ri_docs 19 Nov 2026 01:06:41 -0000
@@ -1254,24 +1254,6 @@ share/ri/${REV}/system/Enumerator/Chain/
share/ri/${REV}/system/Enumerator/Generator/
share/ri/${REV}/system/Enumerator/Generator/cdesc-Generator.ri
share/ri/${REV}/system/Enumerator/Lazy/
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_collect-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_collect_concat-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_drop-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_drop_while-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_filter-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_filter_map-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_find_all-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_flat_map-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_grep-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_grep_v-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_map-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_reject-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_select-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_take-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_take_while-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_uniq-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_with_index-i.ri
-share/ri/${REV}/system/Enumerator/Lazy/_enumerable_zip-i.ri
share/ri/${REV}/system/Enumerator/Lazy/cdesc-Lazy.ri
share/ri/${REV}/system/Enumerator/Lazy/chunk-i.ri
share/ri/${REV}/system/Enumerator/Lazy/chunk_while-i.ri
@@ -1280,6 +1262,7 @@ share/ri/${REV}/system/Enumerator/Lazy/c
share/ri/${REV}/system/Enumerator/Lazy/compact-i.ri
share/ri/${REV}/system/Enumerator/Lazy/drop-i.ri
share/ri/${REV}/system/Enumerator/Lazy/drop_while-i.ri
+share/ri/${REV}/system/Enumerator/Lazy/each_with_index-i.ri
share/ri/${REV}/system/Enumerator/Lazy/eager-i.ri
share/ri/${REV}/system/Enumerator/Lazy/enum_for-i.ri
share/ri/${REV}/system/Enumerator/Lazy/filter-i.ri
Index: 4.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/Makefile,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 Makefile
--- 4.0/Makefile 24 Oct 2026 06:48:19 -0000 1.14
+++ 4.0/Makefile 19 Nov 2026 01:06:41 -0000
@@ -1,4 +1,4 @@
-VERSION = 4.0.9
+VERSION = 4.0.10
DISTNAME = ruby-${VERSION}
PKGNAME-main = ruby-${VERSION}
PKGNAME-ri_docs = ruby${BINREV}-ri_docs-${VERSION}
Index: 4.0/distinfo
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/distinfo,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 distinfo
--- 4.0/distinfo 24 Oct 2026 06:48:19 -0000 1.9
+++ 4.0/distinfo 19 Nov 2026 01:06:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (ruby-4.0.9.tar.gz) = w1NQaC/wULeXAtV63kUW5zNgY/UQFV0Z+y+1s/OQlRE=
-SIZE (ruby-4.0.9.tar.gz) = 23946524
+SHA256 (ruby-4.0.10.tar.gz) = tT7vM3H6XT47dDQO3NAV8G1diFOWjU5TmlJk/OQe2fE=
+SIZE (ruby-4.0.10.tar.gz) = 23973483
Index: 4.0/patches/patch-compile_c
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/patches/patch-compile_c,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-compile_c
--- 4.0/patches/patch-compile_c 19 Sep 2026 00:06:58 -0000 1.5
+++ 4.0/patches/patch-compile_c 19 Nov 2026 01:06:41 -0000
@@ -6,7 +6,7 @@ Avoid unaligned accesses on mips64 and s
Index: compile.c
--- compile.c.orig
+++ compile.c
-@@ -3392,7 +3392,11 @@ static int
+@@ -3401,7 +3401,11 @@ static int
iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int
do_tailcallopt)
{
INSN *const iobj = (INSN *)list;
@@ -18,7 +18,7 @@ Index: compile.c
again:
optimize_checktype(iseq, iobj);
-@@ -14471,8 +14475,11 @@ static VALUE
+@@ -14470,8 +14474,11 @@ static VALUE
ibf_load_object_complex_rational(const struct ibf_load *load, const struct
ibf_object_header *header, ibf_offset_t offset)
{
const struct ibf_object_complex_rational *nums = IBF_OBJBODY(struct
ibf_object_complex_rational, offset);
Index: 4.0/patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/patches/patch-configure,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-configure
--- 4.0/patches/patch-configure 15 May 2026 00:01:29 -0000 1.2
+++ 4.0/patches/patch-configure 19 Nov 2026 01:06:41 -0000
@@ -10,7 +10,7 @@ so ports don't have to be bumped when Op
Index: configure
--- configure.orig
+++ configure
-@@ -11106,7 +11106,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.b
+@@ -11332,7 +11332,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.b
if test "x$rb_cv_libunwind_broken_ra_signing" = "xno"
then :
@@ -19,7 +19,7 @@ Index: configure
do :
# Try these flags in the _prepended_ position - i.e. we want
to try building a program
-@@ -31845,7 +31845,7 @@ main (void)
+@@ -32643,7 +32643,7 @@ main (void)
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
@@ -28,7 +28,7 @@ Index: configure
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -A -n" >&5
-@@ -32393,7 +32393,7 @@ fi
+@@ -33204,7 +33204,7 @@ fi
;; #(
openbsd*|mirbsd*) :
@@ -37,12 +37,12 @@ Index: configure
;; #(
solaris*) :
-@@ -34642,7 +34642,7 @@ then :
-
- else $as_nop
+@@ -35514,7 +35514,7 @@ then :
+ else case e in #(
+ e)
- arch="${target_cpu}-${target_os}"
+ arch="${target_cpu}-openbsd"
-
+ ;;
+ esac
fi
- printf "%s\n" "#define RUBY_PLATFORM \"$arch\"" >>confdefs.h
Index: 4.0/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/pkg/PLIST-main,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 PLIST-main
--- 4.0/pkg/PLIST-main 24 Oct 2026 06:48:19 -0000 1.9
+++ 4.0/pkg/PLIST-main 19 Nov 2026 01:06:41 -0000
@@ -1751,7 +1751,7 @@ lib/ruby/gems/${REV}/gems/irb-1.16.0/lib
lib/ruby/gems/${REV}/gems/irb-1.16.0/lib/irb/xmp.rb
lib/ruby/gems/${REV}/gems/irb-1.16.0/man/
lib/ruby/gems/${REV}/gems/irb-1.16.0/man/irb.1
-lib/ruby/gems/${REV}/gems/json-2.18.0/
+lib/ruby/gems/${REV}/gems/json-2.18.3/
lib/ruby/gems/${REV}/gems/logger-1.7.0/
lib/ruby/gems/${REV}/gems/logger-1.7.0/BSDL
lib/ruby/gems/${REV}/gems/logger-1.7.0/COPYING
@@ -3486,7 +3486,7 @@ lib/ruby/gems/${REV}/specifications/defa
lib/ruby/gems/${REV}/specifications/default/io-nonblock-0.3.2.gemspec
lib/ruby/gems/${REV}/specifications/default/io-wait-0.4.0.gemspec
lib/ruby/gems/${REV}/specifications/default/ipaddr-1.2.8.gemspec
-lib/ruby/gems/${REV}/specifications/default/json-2.18.0.gemspec
+lib/ruby/gems/${REV}/specifications/default/json-2.18.3.gemspec
lib/ruby/gems/${REV}/specifications/default/net-http-0.9.1.gemspec
lib/ruby/gems/${REV}/specifications/default/net-protocol-0.2.2.gemspec
lib/ruby/gems/${REV}/specifications/default/open-uri-0.5.0.gemspec
Index: 4.0/pkg/PLIST-ri_docs
===================================================================
RCS file: /cvs/ports/lang/ruby/4.0/pkg/PLIST-ri_docs,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 PLIST-ri_docs
--- 4.0/pkg/PLIST-ri_docs 19 Sep 2026 00:06:58 -0000 1.6
+++ 4.0/pkg/PLIST-ri_docs 19 Nov 2026 01:06:42 -0000
@@ -1104,6 +1104,7 @@ share/ri/${REV}/system/Enumerator/Lazy/_
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_collect_concat-i.ri
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_drop-i.ri
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_drop_while-i.ri
+share/ri/${REV}/system/Enumerator/Lazy/_enumerable_each_with_index-i.ri
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_filter-i.ri
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_filter_map-i.ri
share/ri/${REV}/system/Enumerator/Lazy/_enumerable_find_all-i.ri
@@ -1126,6 +1127,7 @@ share/ri/${REV}/system/Enumerator/Lazy/c
share/ri/${REV}/system/Enumerator/Lazy/compact-i.ri
share/ri/${REV}/system/Enumerator/Lazy/drop-i.ri
share/ri/${REV}/system/Enumerator/Lazy/drop_while-i.ri
+share/ri/${REV}/system/Enumerator/Lazy/each_with_index-i.ri
share/ri/${REV}/system/Enumerator/Lazy/eager-i.ri
share/ri/${REV}/system/Enumerator/Lazy/enum_for-i.ri
share/ri/${REV}/system/Enumerator/Lazy/filter-i.ri