Bug ID 909695
Summary segmentation fault after pack & ioctl & unpack
Classification openSUSE
Product openSUSE Distribution
Version 13.2
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Ruby
Assignee ruby-devel@suse.de
Reporter bkutil@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

This snippet (requires sudo due to ioctl call) produces a segmentation fault on
the 13.2 ruby [1], affecting current ruby2.0 and ruby2.1 packages. The bug is
currently tracked upstream [2], but not yet fixed, however, a patch is known to
work as a fix when backported [3].

require 'socket'
SIOCETHTOOL = 0x8946
i = ["lo", "\n"].pack("a16p")
s = Socket.new(Socket::AF_INET, Socket::SOCK_DGRAM, 0)
s.ioctl(SIOCETHTOOL, i)
i.unpack("a16p")[1]

[1] ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux-gnu]
[2] https://bugs.ruby-lang.org/issues/10568
[3]
https://github.com/ruby/ruby/commit/4b146b25333c52ca4503dfc3c4215b583e8e9963


You are receiving this mail because: