Net-Dropbear
view release on metacpan or search on metacpan
dropbear.patch view on Meta::CPAN
+
pw = getpwnam(username);
if (!pw) {
return;
diff -uN dropbear-2022.82/configure dropbear/configure
--- dropbear-2022.82/configure 2022-04-01 10:30:00.000000000 -0400
+++ dropbear/configure 2022-04-01 10:30:00.000000000 -0400
@@ -3279,7 +3279,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: Checking for available hardened build flags:" >&5
$as_echo "$as_me: Checking for available hardened build flags:" >&6;}
# relocation flags don't make sense for static builds
- if test "$STATIC" -ne 1; then
+ if false; then
# pie
{
OLDFLAGS="$CFLAGS"
Common subdirectories: dropbear-2022.82/debian and dropbear/debian
diff -uN dropbear-2022.82/dropbear.h dropbear/dropbear.h
--- dropbear-2022.82/dropbear.h 1969-12-31 19:00:00.000000000 -0500
+++ dropbear/dropbear.h 2022-07-06 23:07:07.574753136 -0400
@@ -0,0 +1,16 @@
dropbear/configure view on Meta::CPAN
{ $as_echo "$as_me:${as_lineno-$LINENO}: Disabling hardened build flags" >&5
$as_echo "$as_me: Disabling hardened build flags" >&6;}
fi
fi
if test "$hardenbuild" -eq 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Checking for available hardened build flags:" >&5
$as_echo "$as_me: Checking for available hardened build flags:" >&6;}
# relocation flags don't make sense for static builds
if test "$STATIC" -ne 1; then
# pie
{
OLDFLAGS="$CFLAGS"
TESTFLAGS="-fPIE"
CFLAGS="$CFLAGS $TESTFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
dropbear/configure view on Meta::CPAN
$as_echo "$as_me: Not setting $TESTFLAGS" >&6;}; LDFLAGS="$OLDLDFLAGS"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
# readonly elf relocation sections (relro)
OLDLDFLAGS="$LDFLAGS"
TESTFLAGS="-Wl,-z,now -Wl,-z,relro"
LDFLAGS="$LDFLAGS $TESTFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
dropbear/configure.ac view on Meta::CPAN
[ --disable-harden Don't set hardened build flags],
[
if test "x$enableval" = "xno"; then
hardenbuild=0
AC_MSG_NOTICE(Disabling hardened build flags)
fi
], [])
if test "$hardenbuild" -eq 1; then
AC_MSG_NOTICE(Checking for available hardened build flags:)
# relocation flags don't make sense for static builds
if test "$STATIC" -ne 1; then
# pie
DB_TRYADDCFLAGS([-fPIE])
OLDLDFLAGS="$LDFLAGS"
TESTFLAGS="-Wl,-pie"
LDFLAGS="$LDFLAGS $TESTFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_NOTICE([Setting $TESTFLAGS])],
[
LDFLAGS="$OLDLDFLAGS"
TESTFLAGS="-pie"
LDFLAGS="$LDFLAGS $TESTFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_NOTICE([Setting $TESTFLAGS])],
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
)
]
)
# readonly elf relocation sections (relro)
OLDLDFLAGS="$LDFLAGS"
TESTFLAGS="-Wl,-z,now -Wl,-z,relro"
LDFLAGS="$LDFLAGS $TESTFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_NOTICE([Setting $TESTFLAGS])],
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
)
fi # non-static
# stack protector. -strong is good but only in gcc 4.9 or later
OLDCFLAGS="$CFLAGS"
dropbear/test/test_aslr.py view on Meta::CPAN
print(map1)
print(map2)
# expect something like
# "563174d59000-563174d5d000 r--p 00000000 00:29 4242372 /home/matt/src/dropbear/build/dropbear"
assert map1.endswith('/dropbear') or map1.endswith('/dropbearmulti')
a1 = map1.split()[0]
a2 = map2.split()[0]
print(a1)
print(a2)
# relocation addresses should differ
assert a1 != a2
magic_sizepack|||
magic_wipepack|||
make_matcher|||
make_trie|||
malloc_good_size|||n
malloced_size|||n
malloc||5.007002|n
markstack_grow||5.021001|
matcher_matches_sv|||
maybe_multimagic_gv|||
mayberelocate|||
measure_struct|||
memEQs|5.009005||p
memEQ|5.004000||p
memNEs|5.009005||p
memNE|5.004000||p
mem_collxfrm|||
mem_log_common|||n
mess_alloc|||
mess_nocontext|||vn
mess_sv||5.013001|
op_linklist||5.013006|
op_lvalue_flags|||
op_lvalue||5.013007|
op_null||5.007002|
op_parent||5.021002|n
op_prepend_elem||5.013006|
op_refcnt_dec|||
op_refcnt_inc|||
op_refcnt_lock||5.009002|
op_refcnt_unlock||5.009002|
op_relocate_sv|||
op_scope||5.013007|
op_sibling_splice||5.021002|n
op_std_init|||
op_unscope|||
open_script|||
openn_cleanup|||
openn_setup|||
opmethod_stash|||
opslab_force_free|||
opslab_free_nopad|||
( run in 0.643 second using v1.01-cache-2.11-cpan-5511b514fd6 )