[Bug 1090636] New: pgrep -P 1 seg.faults in containers
http://bugzilla.suse.com/show_bug.cgi?id=1090636 Bug ID: 1090636 Summary: pgrep -P 1 seg.faults in containers Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem Assignee: werner@suse.com Reporter: kukuk@suse.com QA Contact: qa-bugs@suse.de CC: fvogt@suse.com, rbrown@suse.com Found By: --- Blocker: --- Start a opensuse/tumbleweed:latest container Call "pgrep -P 1" With procps 3.3.13, you get a seg.fault. procps 3.3.12 did worked fine. The problem is: opt_pattern is NULL, but in pgrep.c line 655, we use a strlen without checking if opt_pattern is NULL, this leads to a crash. This blocks openSUSE Kubic, where we use pgrep in Containers. I think this change is broken: "grep: warn about 15+ char name only if -f not used" -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1090636
Thorsten Kukuk
http://bugzilla.suse.com/show_bug.cgi?id=1090636
http://bugzilla.suse.com/show_bug.cgi?id=1090636#c1
Dr. Werner Fink
Start a opensuse/tumbleweed:latest container
Call "pgrep -P 1"
With procps 3.3.13, you get a seg.fault. procps 3.3.12 did worked fine.
The problem is: opt_pattern is NULL, but in pgrep.c line 655, we use a strlen without checking if opt_pattern is NULL, this leads to a crash.
This blocks openSUSE Kubic, where we use pgrep in Containers.
I think this change is broken: "grep: warn about 15+ char name only if -f not used"
This seems to be fixed with procps-ng-3.3.14 ... diff -up procps-ng-3.3.13 procps-ng-3.3.14/pgrep.c --- procps-ng-3.3.13/pgrep.c 2018-03-03 08:11:55.682869561 +0100 +++ procps-ng-3.3.14/pgrep.c 2018-04-10 13:14:00.917682291 +0200 [...] @@ -652,7 +652,7 @@ static struct el * select_procs (int *nu closeproc (ptp); *num = matches; - if ((!matches) && (!opt_full) && (strlen(opt_pattern) > 15)) + if ((!matches) && (!opt_full) && opt_pattern && (strlen(opt_pattern) > 15)) xwarnx(_("pattern that searches for process name longer than 15 characters will result in zero matches\n" "Try `%s -f' option to match against the complete command line."), program_invocation_short_name); now there is a SR#600279 -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com