Segmentation Fault in libpcre2-8-0 when using regex in (cifs) volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libpam-mount (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Utkarsh Gupta | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
========
Mounting a cifs volume with a regex condition results in a segfault.
[Test Plan]
===========
$ lxc launch images:ubuntu/focal lp1891552-
$ lxc shell lp1891552-
# apt update && apt install cifs-utils libpam-mount
# adduser user
// add the following lines in /etc/security/
<volume fstype="cifs" server=
<and>
<user regex="
</and>
</volume>
# su - user
// you'll get a segfault.
// with the patched version, it shouldn't segfault and everything
// should work fine, as intended.
[Where Problems Could Occur]
=======
With this problem known, if the user has found a workaround for mounting a cifs volume using some extra configuration or so, then that could break the same on upgrade, I believe. For example, having a workaround way of inserting <volume> in /etc/security/
[Other Info]
The autopkgtests of this package that we've added back in Bionic have degraded since then and were regularly failing. We know the fixes and they were already accepted by Debian. As usual with test fixes they do not
qualify for an upload/SRU on their own, but since we touch these packages anyway we also include the test fixes which will help to add back some coverage. Also OTOH the SRU would be blocked with unresolvable test issues without doing so.
[Discussion(s)]
===============
At system start the system freezes completely. Then I retested during a running session on the command line and I'm getting the error message
Segmentation fault
when I login to another user.
If I remove the 'regex="yes"' everything works.
If I remove the "and" condition everything works.
If I downgrade the libpam-mount package to version 2.16-3ubuntu0.1 of Ubuntu 18.04 everything works including using the regex condition. In Ubuntu 18.04 everything worked fine as well.
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 118 lines (+28/-10)4 files modifieddebian/changelog (+13/-0)
debian/control (+2/-1)
debian/patches/0016-Port-to-pcre2.patch (+5/-5)
debian/tests/local-luks (+8/-4)
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 118 lines (+28/-10)4 files modifieddebian/changelog (+13/-0)
debian/control (+2/-1)
debian/patches/0016-Port-to-pcre2.patch (+5/-5)
debian/tests/local-luks (+8/-4)
Changed in pcre2 (Ubuntu): | |
status: | New → Invalid |
Changed in libpam-mount (Ubuntu Focal): | |
status: | New → Triaged |
description: | updated |
description: | updated |
Changed in libpam-mount (Ubuntu Focal): | |
assignee: | nobody → Utkarsh Gupta (utkarsh) |
no longer affects: | pcre2 (Ubuntu) |
no longer affects: | pcre2 (Ubuntu Focal) |
description: | updated |
Changed in libpam-mount (Ubuntu Focal): | |
status: | Triaged → Fix Committed |
status: | Fix Committed → Triaged |
Hi Daniel,
this seems like a legitimate issue but we'd need some more info.
1. can you on top of the XML config also provide the full exact commands/configs you used for server and client in this case
2. Which application gets the segfault - the server or the mounting client?
3. did you get a core dump of the segfault - if so could you attach that to the bug /help.ubuntu. com/community/ ReportingBugs# Reporting_ a_crash for some help
See https:/