Skip to content

Commit aefbf89

Browse files
committed
Pullup ticket #6987 - requested by taca
lang/ruby33: Security fix Revisions pulled up: - lang/ruby/rubyversion.mk 1.300 - lang/ruby33/Makefile 1.6 - lang/ruby33/distinfo 1.13 - lang/ruby33/patches/patch-lib_resolv.rb 1.1 - lang/ruby33/patches/patch-test_resolv_test__dns.rb 1.1 --- Module Name: pkgsrc Committed By: taca Date: Sun Jul 13 15:32:01 UTC 2025 Modified Files: pkgsrc/lang/ruby: rubyversion.mk pkgsrc/lang/ruby33: Makefile distinfo Added Files: pkgsrc/lang/ruby33/patches: patch-lib_resolv.rb patch-test_resolv_test__dns.rb Log Message: lang/ruby33: update resolv gem Update resolve gem to 0.3.1 to fix security problem of CVE-2025-24294. Bump PKGREVISION.
1 parent 3d434f6 commit aefbf89

5 files changed

Lines changed: 62 additions & 4 deletions

File tree

lang/ruby/rubyversion.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: rubyversion.mk,v 1.298.2.1 2025/07/17 02:17:59 maya Exp $
1+
# $NetBSD: rubyversion.mk,v 1.298.2.2 2025/07/17 02:32:56 maya Exp $
22
#
33

44
# This file determines which Ruby version is used as a dependency for
@@ -419,7 +419,7 @@ RUBY_RDOC_VER= 6.6.3.1
419419
RUBY_READLINE_VER= 0.0.4
420420
RUBY_RELINE_VER= 0.5.10
421421
RUBY_RESOLV_REPLACE_VER= 0.1.1
422-
RUBY_RESOLV_VER= 0.3.0
422+
RUBY_RESOLV_VER= 0.3.1
423423
RUBY_RINDA_VER= 0.2.0
424424
RUBY_RUBY2_KEYWORDS_VER= 0.0.5
425425
RUBY_SECURERANDOM_VER= 0.3.1

lang/ruby33/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# $NetBSD: Makefile,v 1.5 2025/01/02 06:31:58 taca Exp $
1+
# $NetBSD: Makefile,v 1.5.4.1 2025/07/17 02:32:56 maya Exp $
22

33
DISTNAME= ${RUBY_DISTNAME}
44
PKGNAME= ${RUBY_PKGPREFIX}-${RUBY_VERSION}
5+
PKGREVISION= 1
56
CATEGORIES= lang ruby
67
MASTER_SITES= ${MASTER_SITE_RUBY}
78

lang/ruby33/distinfo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$NetBSD: distinfo,v 1.12 2025/04/21 20:54:56 wiz Exp $
1+
$NetBSD: distinfo,v 1.12.2.1 2025/07/17 02:32:56 maya Exp $
22

33
BLAKE2s (ruby-3.3.8.tar.xz) = f7d0fed309c307262b8d5c30781add4d363c2bbf19db7ffc5a5567c414553976
44
SHA512 (ruby-3.3.8.tar.xz) = 71c2f3ac9955e088fa885fd2ff695e67362a770a5d33e5160081eda3dd298ca2c692e299b03d757caecfbc94043fedc4ad093de84c505585d480cb36bbf978b9
@@ -9,13 +9,15 @@ SHA1 (patch-ext_openssl_openssl__missing.h) = 3f8d79736fd14806dfaf76e333eec63ff3
99
SHA1 (patch-include_ruby_internal_static__assert.h) = 7d5c3ae7ff674b9b34639924fcf08237164de9f8
1010
SHA1 (patch-lib_mkmf.rb) = 4a3cd18548dbdf43a13695d4e76f817c0347e335
1111
SHA1 (patch-lib_rdoc_encoding.rb) = 0e82d2942d9bfcb67dc7c994889d7bc5ec2ae85a
12+
SHA1 (patch-lib_resolv.rb) = b091b1207c6bceafca2b2f65cc3e197377a73b91
1213
SHA1 (patch-lib_rubygems.rb) = 81af71ae9b0c3fef2ad1de88a542b3ece14b4519
1314
SHA1 (patch-lib_rubygems_commands_setup__command.rb) = 66c475a5308deb2ed5096b88cf65549732f87421
1415
SHA1 (patch-lib_rubygems_config__file.rb) = 584f8cd9ef1d1b9bf25efc7e85c2219166db7ac9
1516
SHA1 (patch-lib_rubygems_dependency__installer.rb) = d143128b21a3803136c2d0000d75a1cf50d77155
1617
SHA1 (patch-lib_rubygems_install__update__options.rb) = 0cd0816e1cd7c84c1dab1e091787c4dc38d28273
1718
SHA1 (patch-lib_rubygems_installer.rb) = 4ef74b4f79837a929e81bcd0e7eba9061a442304
1819
SHA1 (patch-lib_rubygems_platform.rb) = bde36a8fc1ba2fbf4d6fb8829bc116fb4d09b404
20+
SHA1 (patch-test_resolv_test__dns.rb) = 4f26c9b1643a4af71f3389bfda17e416297f902c
1921
SHA1 (patch-test_rubygems_test__gem.rb) = 32f7c7d7f8a024c045d78c2bce93944fc3113d04
2022
SHA1 (patch-thread__pthread.c) = 7c1231933a2d6ce9d56891ab512371841697fbca
2123
SHA1 (patch-tool_ifchange) = 1814cd41f0b0a93b181799cb117bd1f57068cf33
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
$NetBSD: patch-lib_resolv.rb,v 1.1.2.2 2025/07/17 02:32:56 maya Exp $
2+
3+
Update resolv gem to 0.3.1.
4+
5+
--- lib/resolv.rb.orig 2025-04-09 09:23:04.000000000 +0000
6+
+++ lib/resolv.rb
7+
@@ -37,7 +37,7 @@ end
8+
9+
class Resolv
10+
11+
- VERSION = "0.3.0"
12+
+ VERSION = "0.3.1"
13+
14+
##
15+
# Looks up the first IP address for +name+.
16+
@@ -1655,6 +1655,7 @@ class Resolv
17+
prev_index = @index
18+
save_index = nil
19+
d = []
20+
+ size = -1
21+
while true
22+
raise DecodeError.new("limit exceeded") if @limit <= @index
23+
case @data.getbyte(@index)
24+
@@ -1675,7 +1676,10 @@ class Resolv
25+
end
26+
@index = idx
27+
else
28+
- d << self.get_label
29+
+ l = self.get_label
30+
+ d << l
31+
+ size += 1 + l.string.bytesize
32+
+ raise DecodeError.new("name label data exceed 255 octets") if size > 255
33+
end
34+
end
35+
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
$NetBSD: patch-test_resolv_test__dns.rb,v 1.1.2.2 2025/07/17 02:32:56 maya Exp $
2+
3+
Update resolv gem to 0.3.1.
4+
5+
--- test/resolv/test_dns.rb.orig 2025-04-09 09:23:04.000000000 +0000
6+
+++ test/resolv/test_dns.rb
7+
@@ -589,6 +589,13 @@ class TestResolvDNS < Test::Unit::TestCa
8+
assert_operator(2**14, :<, m.to_s.length)
9+
end
10+
11+
+ def test_too_long_address
12+
+ too_long_address_message = [0, 0, 1, 0, 0, 0].pack("n*") + "\x01x" * 129 + [0, 0, 0].pack("cnn")
13+
+ assert_raise_with_message(Resolv::DNS::DecodeError, /name label data exceed 255 octets/) do
14+
+ Resolv::DNS::Message.decode too_long_address_message
15+
+ end
16+
+ end
17+
+
18+
def assert_no_fd_leak
19+
socket = assert_throw(self) do |tag|
20+
Resolv::DNS.stub(:bind_random_port, ->(s, *) {throw(tag, s)}) do

0 commit comments

Comments
 (0)