Not to be fixed
Created: Feb 16, 2013
Updated: Apr 19, 2018
Resolved Date: Apr 17, 2018
Previous ID: LIN5-6952, LIN6-3110
Found In Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: BSP
Problem Description
======================
postgresql initializing database fail caused by grsec.
BTW, test can pass on Jan 29 git repository, bellow is the pass log.
http://pek-rth-vm1.wrs.com/publiclog/wrl501_penguin/networking/MASTER0129/fsl-p50xx/cgl/postgresql.log
audit2allow also have this issue.
root@localhost:~# audit2allow --help
grsec: Illegal instruction occurred at 00000000ea528428 in /usr/bin/audit2allow[audit2allow:1539] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:1487] uid/euid:0/0 gid/egid:0/0
2013 Feb 16 18:23:52 localhost grsec: Illegal instruction occurred at 00000000ea528428 in /usr/bin/audit2allow[audit2allow:1539] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:1487] uid/euid:0/0 gid/egid:0/0
Illegal instruction (core dumped)
root@localhost:~#
semanage also have this issue:
root@localhost:~# semanage login -l
grsec: Illegal instruction occurred at 00000000e465d428 in /usr/sbin/semanage[semanage:4719] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4661] uid/euid:0/0 gid/egid:0/0
2013 Mar 10 06:2grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/sbin/semanage[semanage:4719] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4661] uid/euid:0/0 gid/egid:0/0
6:17 localhost grsec: Illegal instruction occurred at 00000000e465d428 in /usr/sbin/semanage[semanage:4719] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4661] uid/euid:0/0 gid/egid:0/0
2013 Mar 10 06:26:17 localhost grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/sbin/semanage[semanage:4719] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4661] uid/euid:0/0 gid/egid:0/0
Illegal instruction
root@localhost:~#
Expected Behavior
======================
initializing database success.
Observed Behavior
======================
root@localhost:/opt/wr-test/testcases/networking/postgresql# /etc/init.d/postgresql-server initdb
grsec: Illegal instruction occurred at 00000000eb6b9428 in /usr/bin/postgres[postgres:1943] uid/euid:28/28 gid/egid:28/28, parent /bin/bash[sh:1942] uid/euid:28/28 gid/egid:28/28
grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/bin/postgres[postgres:1943] uid/euid:28/28 gid/egid:28/28, parent /bin/bash[sh:1942] uid/euid:28/28 gid/egid:28/28
2013 Feb 17 14:24:05 localhost grsec: Illegal instruction occurred at 00000000eb6b9428 in /usr/bin/postgres[postgres:1943] uid/euid:28/28 gid/egid:28/28, parent /bin/bash[sh:1942] uid/euid:28/28 gid/egid:28/28
2013 Feb 17 14:24:05 localhost grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/bin/postgres[postgres:1943] uid/euid:28/28 gid/egid:28/28, parent /bin/bash[sh:1942] uid/euid:28/28 gid/egid:28/28
[FAILED]
root@localhost:/opt/wr-test/testcases/networking/postgresql# echo $?
1
root@localhost:/opt/wr-test/testcases/networking/postgresql#
1.configure --enable-board=fsl-p50xx --enable-kernel=cgl --enable-rootfs=glibc_cgl --enable-parallel-pkgbuilds=8 --enable-jobs=8 --with-layer=examples/hello-world --with-template=feature/lsbtesting,feature/hello-world,feature/cut,feature/analysis,feature/debug --enable-build=profiling
2.boot up target
3.execute bellow command
ulimit -c unlimited
/etc/init.d/postgresql-server stop
rm -rf /var/lib/postgresql/data
/etc/init.d/postgresql-server initdb
udit2allow --help