Project

General

Profile

Actions

Bug #21181

closed

LoadError in P4Ruby on Windows (MSYS2) After Ruby Security Update

Added by hjain (Himanshu Jain) about 18 hours ago. Updated about 2 hours ago.

Status:
Feedback
Assignee:
-
Target version:
-
ruby -v:
3.0.7, 3.1.5, 3.2.4, 3.3.1
[ruby-core:121293]

Description

After updating to Ruby versions 3.0.7, 3.1.5, 3.2.4, and 3.3.1, P4Ruby fails to load with the following error:

<internal:c:/Ruby/x64/ruby-3.0.7-devkit/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require':  
126: The specified module could not be found. - C:/build/p4ruby/lib/P4.so (LoadError)

This issue started occurring after the release of CVE-2024-27282: Arbitrary memory address read vulnerability with Regex search. The same P4Ruby build worked on earlier Ruby versions but now consistently fails.

Environment:

  • OS: Windows 10/11
  • Ruby Versions Affected: 3.0.7, 3.1.5, 3.2.4, 3.3.1
  • MSYS2 Version: mingw-w64-x86_64 toolchain
  • Perforce P4Ruby Version: Latest from source
  • Compiler Used: x86_64-w64-mingw32-gcc (from MSYS2)

Updated by hjain (Himanshu Jain) about 18 hours ago

After updating to Ruby versions 3.0.7, 3.1.5, 3.2.4, and 3.3.1, P4Ruby fails to load with the following error:
internal:c:/Ruby/x64/ruby-3.0.7-devkit/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in `require':
126: The specified module could not be found. - C:/build/p4ruby/lib/P4.so (LoadError)

This issue started occurring after the release of CVE-2024-27282: Arbitrary memory address read vulnerability with Regex search.

I am able to load the P4Ruby build from previous Ruby versions in these new versions.
However, P4Ruby built with these new Ruby versions fails to load on both old and new Ruby versions.

Environment:

OS: Windows 10/11
Ruby Versions Affected: 3.0.7, 3.1.5, 3.2.4, 3.3.1
MSYS2 Version: mingw-w64-x86_64 toolchain
Perforce P4Ruby Version: Latest from source
Compiler Used: x86_64-w64-mingw32-gcc (from MSYS2)

Updated by alanwu (Alan Wu) about 9 hours ago

  • Status changed from Open to Feedback

Make sure P4.so exists and try passing an absolute path of it to require.

Updated by nobu (Nobuyoshi Nakada) about 2 hours ago

  • Description updated (diff)

Seems like a DLL used by that P4.so lacked.
Check the DLLs by ldd C:/build/p4ruby/lib/P4.so.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0