[Bug 259971] lib.libc.regex.exhaust_test.regcomp_too_big fails with ASLR on by default

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 21 Nov 2021 16:10:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259971

            Bug ID: 259971
           Summary: lib.libc.regex.exhaust_test.regcomp_too_big fails with
                    ASLR on by default
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: tests
          Assignee: testing@FreeBSD.org
          Reporter: emaste@freebsd.org
            Blocks: 259968

As reported by lwhsu and mw on -current 
lib.libc.regex.exhaust_test.regcomp_too_big fails after ASLR was enabled by
default

https://ci.freebsd.org/job/FreeBSD-main-amd64-test/19867/testReport/junit/lib.libregex/exhaust_test/regcomp_too_big/

Process with PID 3322 exited with signal 11 and dumped core; attempting to
gather stack trace
[New LWP 101363]
Core was generated by `/usr/tests/lib/libregex/exhaust_test
-vallow_sysctl_side_effects -vcam_test_devi'.
Program terminated with signal SIGSEGV, Segmentation fault.
Invalid permissions for mapped object.
#0  0x00001b476990418c in p_ere_exp (p=0x7fffffda1fc0, bc=<optimized out>) at
/usr/src/lib/libc/regex/regcomp.c:418
418     /usr/src/lib/libc/regex/regcomp.c: No such file or directory.
#0  0x00001b476990418c in p_ere_exp (p=0x7fffffda1fc0, bc=<optimized out>) at
/usr/src/lib/libc/regex/regcomp.c:418
#1  0x00001b47699062eb in p_re (p=p@entry=0x7fffffda1fc0, end1=end1@entry=41,
end2=end2@entry=-130) at /usr/src/lib/libc/regex/regcomp.c:783
#2  0x00001b4769904681 in p_ere_exp (p=<optimized out>, bc=<optimized out>) at
/usr/src/lib/libc/regex/regcomp.c:427
#3  0x00001b47699062eb in p_re (p=p@entry=0x7fffffda1fc0, end1=end1@entry=41,
end2=end2@entry=-130) at /usr/src/lib/libc/regex/regcomp.c:783
#4  0x00001b4769904681 in p_ere_exp (p=<optimized out>, bc=<optimized out>) at
/usr/src/lib/libc/regex/regcomp.c:427
...
#18796 0x00001b4769904681 in p_ere_exp (p=<optimized out>, bc=<optimized out>)
at /usr/src/lib/libc/regex/regcomp.c:427
#18797 0x00001b47699062eb in p_re (p=p@entry=0x7fffffda1fc0,
end1=end1@entry=-129, end2=end2@entry=-129) at
/usr/src/lib/libc/regex/regcomp.c:783
#18798 0x00001b47699033e0 in regcomp_internal (cflags=1750826696, pflags=0,
preg=<optimized out>, pattern=<optimized out>) at
/usr/src/lib/libc/regex/regcomp.c:318
#18799 regcomp (preg=0x7fffffda21a0, pattern=0x1b476ac3e480
"(.?)(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}(.\\{0,}"...,
cflags=1) at /usr/src/lib/libc/regex/regcomp.c:371
#18800 0x00001b3f67584600 in ?? ()
#18801 0x00001b4767ed3057 in atf_tc_run (tc=0x1b3f67587bb8,
tc@entry=0x1b476abee020, resfile=<optimized out>, resfile@entry=0x1 <error:
Cannot access memory at address 0x1>) at /usr/src/contrib/atf/atf-c/tc.c:1054
#18802 0x00001b4767ed516e in atf_tp_run (tp=tp@entry=0x7fffffda2a78,
tcname=tcname@entry=0x1b476abee020 "regcomp_too_big", resfile=<optimized out>)
at /usr/src/contrib/atf/atf-c/tp.c:201
#18803 0x00001b4767ed5b63 in run_tc (tp=0x7fffffda2a78, p=0x7fffffda2a90,
exitcode=<optimized out>) at /usr/src/contrib/atf/atf-c/detail/tp_main.c:504
#18804 controlled_main (argc=<optimized out>, argv=0x7fffffda3b38,
add_tcs_hook=0x1b3f67584450, exitcode=<optimized out>) at
/usr/src/contrib/atf/atf-c/detail/tp_main.c:574
#18805 atf_tp_main (argc=<optimized out>, argv=0x7fffffda3b38,
add_tcs_hook=0x1b3f67584450) at /usr/src/contrib/atf/atf-c/detail/tp_main.c:604
#18806 0x00001b3f6758421d in ?? ()
#18807 0x0000000000000000 in ?? ()
GDB exited successfully
Files left in work directory after failure: exhaust_test.core


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259968
[Bug 259968] ASLR by default tracking PR
-- 
You are receiving this mail because:
You are the assignee for the bug.