| Summary: | Regression from MGA4: Autofs dumps core when /net is used | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Dag Nygren <dag> |
| Component: | RPM Packages | Assignee: | Shlomi Fish <shlomif> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | dag, marja11 |
| Version: | 5 | Keywords: | PATCH |
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | autofs-5.1.0-4.mga5 | CVE: | |
| Status comment: | |||
| Attachments: | Patch to fix returning a reference to the Åtack | ||
|
Description
Dag Nygren
2015-08-18 15:11:59 CEST
Ran this under gdb and got the following backtrace, hope it helps..: #0 0x0000000000000000 in ?? () #1 0x00007ffff69316b5 in clnt_dg_call () from /lib64/libtirpc.so #2 0x00007ffff47612e4 in rpc_portmap_getport () from /usr/lib64/autofs/lookup_hosts.so #3 0x00007ffff4761cf7 in rpc_get_exports () from /usr/lib64/autofs/lookup_hosts.so #4 0x00007ffff475c9e5 in ?? () from /usr/lib64/autofs/lookup_hosts.so #5 0x00007ffff475d43b in lookup_mount () from /usr/lib64/autofs/lookup_hosts.so #6 0x000055555556e101 in do_name_lookup_mount (name_len=6, name=0x7ffff7fb9f10 "backup", map=0x5555557c8740, ap=0x5555557c8630) at lookup.c:979 #7 lookup_nss_mount (ap=ap@entry=0x5555557c8630, source=source@entry=0x0, name=name@entry=0x7ffff7fb9f10 "backup", name_len=6) at lookup.c:1132 #8 0x0000555555563dbb in do_mount_indirect (arg=<optimized out>) at indirect.c:772 #9 0x00007ffff7bc85bd in start_thread () from /lib64/libpthread.so.0 #10 0x00007ffff739b5cd in clone () from /lib64/libc.so.6 Ok, debugged this and found that rpc_get_export() returns a pointer to an exports structure that is on the stack !!! Typical error of inexperience... And might work with some compilers and sometime.... Patching the function with an additional "static" in front of the variable makes things work. Patch enclosed to the case. Created attachment 6937 [details]
Patch to fix returning a reference to the Åtack
Dag Nygren
2015-08-18 17:23:30 CEST
CC:
(none) =>
dag Having a closer look at the (messy) code in rpc_get_exports() the reason I gave for the problem is wrong, so sorry for that. But the patch does work... I just don't know why.
David Walser
2015-08-25 23:28:46 CEST
Assignee:
bugsquad =>
shlomif @ Dag, Thank you for having taken the needed time to report this issue! Did this bug get fixed? If so, please change it's status to RESOLVED - FIXED If it didn't, then we regret that we weren't able to fix it in Mageia 5. Mageia 5 has officially reached its End of Life on December 31st, 2017 https://blog.mageia.org/en/2017/11/07/mageia-5-eol-postponed/ It only continued to get important security updates since then, because we are waiting for a big Plasma5 update in Mageia 6, that'll fix many of the Mageia 5 => 6 upgrade issues. If you haven't seen that this bug got fixed, then please check whether this bug still exists in Mageia 6. If it does, then please change the Version (near the top, at the left) to "6". If you know it exists in Cauldron, then change Version to Cauldron. If you see it in both Cauldron and Mageia 6, then please set version to Cauldron and add MGA6TOO on the Whiteboard. Thanks, Marja CC:
(none) =>
marja11 Haven't seen the problem for quite a while now so I believe that it is fixed since my report. Resolution:
(none) =>
FIXED |