busybox-1.19.3-r1でsshログインしたらエラーが出る
- /bin/busyboxにsuidをセット
- ローカルログインではエラー無し
$ grep ^LDFLAGS /etc/make.conf LDFLAGS="-Wl,--hash-style=both,-Wl -O1,--as-needed" $ sudo emerge -1av sys-apps/busybox $ sudo chmod u+s /bin/busybox $ sudo chmod 600 /etc/busybox.conf $ sudo cat /etc/busybox.conf [SUID] su = ssx root.0 ls = ---
ログインシェルをbusybox ashに変更
$ sudo ln -sv busybox /bin/ash $ chsh -s /bin/ash
USEフラグ
- sys-apps/busybox savedconfig
- sys-libs/glibc gd nls -glibc-omitfp
他のマシンからGentooマシンにログイン
$ ssh gentoobox
Error Messages
*** glibc detected *** -ash: free(): invalid pointer: 0x0972f0d4 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6e781)[0xb75f7781] /lib/libc.so.6(+0x700b3)[0xb75f90b3] /lib/libc.so.6(cfree+0x6d)[0xb75fc23d] -ash[0x804f9b3] -ash[0x804fa0e] -ash[0x804f001] -ash[0x809ffaf] -ash[0x80a4e99] -ash[0x80aa825] -ash[0x80a6c78] -ash[0x80a725e] -ash[0x80a751b] -ash[0x80aa45d] -ash[0x80a6c78] -ash[0x80a6c78] -ash[0x80a6c78] -ash[0x80a982d] -ash[0x80aa993] -ash[0x80a0f8d] -ash[0x80aa728] -ash[0x80a6c78] -ash[0x80a6c78] -ash[0x80a8ca2] -ash[0x80a6c78] -ash[0x80a982d] -ash[0x80aaa5d] -ash[0x80ab781] -ash[0x804ef56] -ash[0x804f1af] -ash[0x804f7b0] /lib/libc.so.6(__libc_start_main+0xe6)[0xb75a3296] -ash[0x811f86d] ======= Memory map: ======== 08048000-0814a000 r-xp 00000000 08:05 14817 /bin/busybox 0814a000-0814b000 r--p 00101000 08:05 14817 /bin/busybox 0814b000-0814c000 rw-p 00102000 08:05 14817 /bin/busybox 0814c000-0814e000 rw-p 00000000 00:00 0 0972f000-09750000 rw-p 00000000 00:00 0 [heap] b7400000-b7421000 rw-p 00000000 00:00 0 b7421000-b7500000 ---p 00000000 00:00 0 b7588000-b7589000 rw-p 00000000 00:00 0 b7589000-b76e1000 r-xp 00000000 08:05 12214 /lib/libc-2.13.so b76e1000-b76e3000 r--p 00158000 08:05 12214 /lib/libc-2.13.so b76e3000-b76e4000 rw-p 0015a000 08:05 12214 /lib/libc-2.13.so b76e4000-b76e7000 rw-p 00000000 00:00 0 b76e7000-b770b000 r-xp 00000000 08:05 14795 /lib/libm-2.13.so b770b000-b770c000 r--p 00023000 08:05 14795 /lib/libm-2.13.so b770c000-b770d000 rw-p 00024000 08:05 14795 /lib/libm-2.13.so b7719000-b7732000 r-xp 00000000 08:05 10769 /lib/libgcc_s.so.1 b7732000-b7733000 r--p 00018000 08:05 10769 /lib/libgcc_s.so.1 b7733000-b7734000 rw-p 00019000 08:05 10769 /lib/libgcc_s.so.1 b7734000-b7736000 rw-p 00000000 00:00 0 b7736000-b7752000 r-xp 00000000 08:05 14253 /lib/ld-2.13.so b7752000-b7753000 r--p 0001b000 08:05 14253 /lib/ld-2.13.so b7753000-b7754000 rw-p 0001c000 08:05 14253 /lib/ld-2.13.so bf7e2000-bf803000 rw-p 00000000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Aborted *** glibc detected *** -ash: free(): invalid pointer: 0x0972f0d4 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6e781)[0xb75f7781] /lib/libc.so.6(+0x700b3)[0xb75f90b3] /lib/libc.so.6(cfree+0x6d)[0xb75fc23d] -ash[0x804f9b3] -ash[0x804fa0e] -ash[0x804f001] -ash[0x809ffaf] -ash[0x80a4e99] -ash[0x80aa825] -ash[0x80a6c78] -ash[0x80a725e] -ash[0x80a751b] -ash[0x80a8a26] -ash[0x80a6c78] -ash[0x80a982d] -ash[0x80aaa5d] -ash[0x80ab565] -ash[0x804ef56] -ash[0x804f1af] -ash[0x804f7b0] /lib/libc.so.6(__libc_start_main+0xe6)[0xb75a3296] -ash[0x811f86d] ======= Memory map: ======== 08048000-0814a000 r-xp 00000000 08:05 14817 /bin/busybox 0814a000-0814b000 r--p 00101000 08:05 14817 /bin/busybox 0814b000-0814c000 rw-p 00102000 08:05 14817 /bin/busybox 0814c000-0814e000 rw-p 00000000 00:00 0 0972f000-09750000 rw-p 00000000 00:00 0 [heap] b7100000-b7121000 rw-p 00000000 00:00 0 b7121000-b7200000 ---p 00000000 00:00 0 b7256000-b726f000 r-xp 00000000 08:05 10769 /lib/libgcc_s.so.1 b726f000-b7270000 r--p 00018000 08:05 10769 /lib/libgcc_s.so.1 b7270000-b7271000 rw-p 00019000 08:05 10769 /lib/libgcc_s.so.1 b7299000-b7388000 r--p 04065000 08:05 183056 /usr/lib/locale/locale-archive b7388000-b7588000 r--p 00000000 08:05 183056 /usr/lib/locale/locale-archive b7588000-b7589000 rw-p 00000000 00:00 0 b7589000-b76e1000 r-xp 00000000 08:05 12214 /lib/libc-2.13.so b76e1000-b76e3000 r--p 00158000 08:05 12214 /lib/libc-2.13.so b76e3000-b76e4000 rw-p 0015a000 08:05 12214 /lib/libc-2.13.so b76e4000-b76e7000 rw-p 00000000 00:00 0 b76e7000-b770b000 r-xp 00000000 08:05 14795 /lib/libm-2.13.so b770b000-b770c000 r--p 00023000 08:05 14795 /lib/libm-2.13.so b770c000-b770d000 rw-p 00024000 08:05 14795 /lib/libm-2.13.so b772d000-b7734000 r--s 00000000 08:05 183045 /usr/lib/gconv/gconv-modules.cache b7734000-b7736000 rw-p 00000000 00:00 0 b7736000-b7752000 r-xp 00000000 08:05 14253 /lib/ld-2.13.so b7752000-b7753000 r--p 0001b000 08:05 14253 /lib/ld-2.13.so b7753000-b7754000 rw-p 0001c000 08:05 14253 /lib/ld-2.13.so bf7e2000-bf803000 rw-p 00000000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
解決策はこちら
コメント
コメントを投稿