Bug 1447832 - [abrt] kpartx: set_delimiter(): kpartx killed by SIGSEGV
Summary: [abrt] kpartx: set_delimiter(): kpartx killed by SIGSEGV
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: device-mapper-multipath
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Marzinski
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:7c9aeaa942cbac975a8c77735b3...
Depends On:
Blocks: 1448223
TreeView+ depends on / blocked
 
Reported: 2017-05-04 01:47 UTC by sedrubal
Modified: 2017-07-21 22:10 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
: 1448223 (view as bug list)
Environment:
Last Closed: 2017-07-21 22:10:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (64.30 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: cgroup (242 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: core_backtrace (445 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: dso_list (1.63 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: environ (2.49 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: exploitable (82 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: limits (1.29 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: maps (8.39 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: mountinfo (3.85 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: namespaces (102 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: open_fds (196 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: proc_pid_status (1.23 KB, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details
File: var_log_messages (301 bytes, text/plain)
2017-05-04 01:47 UTC, sedrubal
no flags Details

Description sedrubal 2017-05-04 01:47:11 UTC
Version-Release number of selected component:
kpartx-0.4.9-83.fc25

Additional info:
reporter:       libreport-2.8.0
backtrace_rating: 4
cmdline:        kpartx -l /
crash_function: set_delimiter
executable:     /usr/sbin/kpartx
global_pid:     2449
kernel:         4.10.13-200.fc25.x86_64
pkg_fingerprint: 4089 D8F2 FDB1 9C98
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (1 frames)
 #0 set_delimiter at kpartx.c:117

Comment 1 sedrubal 2017-05-04 01:47:21 UTC
Created attachment 1276063 [details]
File: backtrace

Comment 2 sedrubal 2017-05-04 01:47:23 UTC
Created attachment 1276064 [details]
File: cgroup

Comment 3 sedrubal 2017-05-04 01:47:24 UTC
Created attachment 1276065 [details]
File: core_backtrace

Comment 4 sedrubal 2017-05-04 01:47:26 UTC
Created attachment 1276066 [details]
File: dso_list

Comment 5 sedrubal 2017-05-04 01:47:28 UTC
Created attachment 1276067 [details]
File: environ

Comment 6 sedrubal 2017-05-04 01:47:29 UTC
Created attachment 1276068 [details]
File: exploitable

Comment 7 sedrubal 2017-05-04 01:47:31 UTC
Created attachment 1276069 [details]
File: limits

Comment 8 sedrubal 2017-05-04 01:47:34 UTC
Created attachment 1276070 [details]
File: maps

Comment 9 sedrubal 2017-05-04 01:47:36 UTC
Created attachment 1276071 [details]
File: mountinfo

Comment 10 sedrubal 2017-05-04 01:47:38 UTC
Created attachment 1276072 [details]
File: namespaces

Comment 11 sedrubal 2017-05-04 01:47:40 UTC
Created attachment 1276073 [details]
File: open_fds

Comment 12 sedrubal 2017-05-04 01:47:41 UTC
Created attachment 1276074 [details]
File: proc_pid_status

Comment 13 sedrubal 2017-05-04 01:47:43 UTC
Created attachment 1276075 [details]
File: var_log_messages

Comment 14 Ben Marzinski 2017-05-04 20:56:08 UTC
Thanks for the report. This will only happen if you run kpartx on something other than a regular file or a block device. I'll fix it up so that it handles this
gracefully.

Comment 15 Ben Marzinski 2017-07-21 22:10:38 UTC
device-mapper-multipath-0.7.1-4.git847cc43.fc27 has a fix for this. Here's the upstream commit, that got pulled in with the new sources.

commit 3d9102bc0fd51988477fc1aade53be358d1b02aa
Author: Benjamin Marzinski <bmarzins>
Date:   Tue May 9 11:57:04 2017 -0500

    kpartx: fix device checks

    There are a number of issues in the the kpartx device checking code.
    First, it accepts files that are neither regular files or a block device
    nodes (you can run kpartx on character devices or directories, and it
    will treat them as block devices). When trying to figure out the
    basename of a device, the code returns garbage if the path doesn't
    include a '/'. Finally, the set_delimiter code can access memory outside
    of the string if an empty string is passed in.

    Signed-off-by: Benjamin Marzinski <bmarzins>


Note You need to log in before you can comment on or make changes to this bug.