Hide Forgot
Description of problem: automount segfaults if a bad hosts entry is added in /etc/auto.master Version-Release number of selected component (if applicable): # rpm -q autofs autofs-5.0.7-99.el7.x86_64 How reproducible: always Steps to Reproduce: 1. Add a bad entry in /etc/auto/master like below # grep -v ^# /etc/auto.master | grep -i hosts /net -hosts @ -hosts <--------------- 2. Trigger a crash by running automount -m or simply automount # automount -m 100000000|syntax error in map near [ @ -hosts ] Segmentation fault (core dumped) # dmesg | tail -f [ 1684.146282] automount[6707]: segfault at 0 ip 00007f023f9d2901 sp 00007ffc0f4b8638 error 4 in libc-2.17.so[7f023f864000+1c2000] Actual results: # automount -m 100000000|syntax error in map near [ @ -hosts ] Segmentation fault (core dumped) Expected results: To not segfault and return the correct maps. # automount -m 100000000|syntax error in map near [ @ -hosts ] autofs dump map information =========================== global options: none configured Mount point: /misc source(s): instance type(s): file map: /etc/auto.misc cd | -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom Mount point: /net source(s): type: hosts localhost | (null) Additional info: Unable to reproduce the issue on fedora. # rpm -q autofs autofs-5.1.5-4.fc30.x86_64
(In reply to Kenneth D'souza from comment #0) > Description of problem: > automount segfaults if a bad hosts entry is added in /etc/auto.master > > Version-Release number of selected component (if applicable): > # rpm -q autofs > autofs-5.0.7-99.el7.x86_64 > > How reproducible: > always > > Steps to Reproduce: > 1. Add a bad entry in /etc/auto/master like below > > # grep -v ^# /etc/auto.master | grep -i hosts > /net -hosts > @ -hosts <--------------- > > 2. Trigger a crash by running automount -m or simply automount Mmm ... I'm not able to reproduce this. I tried on Centos7 with rev 99 and couldn't reproduce it, so I checked out a RHEL-7.6 lab machine and still couldn't reproduce it. I'll try installing 7.6 into a VM and apply any updates and see if I can reproduce it then. If I can't reproduce it we'll need to inspect a core on an install that can reproduce it to see if we can get more information. Ian
(In reply to Ian Kent from comment #2) > (In reply to Kenneth D'souza from comment #0) > > Description of problem: > > automount segfaults if a bad hosts entry is added in /etc/auto.master > > > > Version-Release number of selected component (if applicable): > > # rpm -q autofs > > autofs-5.0.7-99.el7.x86_64 > > > > How reproducible: > > always > > > > Steps to Reproduce: > > 1. Add a bad entry in /etc/auto/master like below > > > > # grep -v ^# /etc/auto.master | grep -i hosts > > /net -hosts > > @ -hosts <--------------- > > > > 2. Trigger a crash by running automount -m or simply automount > > Mmm ... I'm not able to reproduce this. > > I tried on Centos7 with rev 99 and couldn't reproduce it, so I checked > out a RHEL-7.6 lab machine and still couldn't reproduce it. > > I'll try installing 7.6 into a VM and apply any updates and see if I > can reproduce it then. > > If I can't reproduce it we'll need to inspect a core on an install > that can reproduce it to see if we can get more information. > > Ian Sorry I missed to update that the issue is seen only if I have a autofs file inside /etc/auto.master.d # cat /etc/auto.master.d/direct.autofs /- /etc/auto.direct # cat /etc/auto.direct /test/data -rw nfs-server:/example # grep -v ^# /etc/auto.master /misc /etc/auto.misc /net -hosts @ -hosts <-------------------------------------- bad entry +dir:/etc/auto.master.d <----------------------------------- this is necessary +auto.master I hope this helps.
(In reply to Kenneth D'souza from comment #3) > > Sorry I missed to update that the issue is seen only if I have a autofs file > inside /etc/auto.master.d > > # cat /etc/auto.master.d/direct.autofs > /- /etc/auto.direct > > # cat /etc/auto.direct > /test/data -rw nfs-server:/example > > # grep -v ^# /etc/auto.master > /misc /etc/auto.misc > /net -hosts > @ -hosts <-------------------------------------- bad entry > +dir:/etc/auto.master.d <----------------------------------- this is > necessary > +auto.master > > I hope this helps. That did the trick, I'll sort it out. Thanks Ian
Created attachment 1594586 [details] Patch - fix reset flex scan buffer on init Found it.
Change applied, built and verified to work for the case here. The build can be found at: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=940222 Please test to make sure it really is ok.
(In reply to Ian Kent from comment #6) > Change applied, built and verified to work for the case here. > The build can be found at: > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=940222 > > Please test to make sure it really is ok. Works for me!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1106