Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault reading manifest directly from APKs #7

Open
xxxserxxx opened this issue Feb 10, 2020 · 0 comments
Open

Segfault reading manifest directly from APKs #7

xxxserxxx opened this issue Feb 10, 2020 · 0 comments

Comments

@xxxserxxx
Copy link

Running in the mode where axmldec reads the manifest directly from the .apk, axmldec always segfaults.

Steps to Reproduce

axmldec anyapp.apk

Environment

I've tried with numerous APKs; one was created in 2015 (old project), and one was just created today with an Android SDK I installed this week.

  • axmldec: b0a73d27b108a55
  • OS: Linux 5.5.2-arch1-1
  • Linked libraries:
    • /usr/lib/libboost_system.so.1.72.0
    • /usr/lib/libboost_iostreams.so.1.72.0
    • /usr/lib/libboost_program_options.so.1.72.0
    • /usr/lib/libboost_locale.so.1.72.0
    • /usr/lib/libboost_chrono.so.1.72.0
    • /usr/lib/libboost_thread.so.1.72.0
    • /usr/lib/libpthread.so.0
    • /usr/lib/libz.so.1
    • /usr/lib/libstdc++.so.6
    • /usr/lib/libm.so.6
    • /usr/lib/libgcc_s.so.1
    • /usr/lib/libc.so.6
    • /usr/lib/librt.so.1
    • /usr/lib/libbz2.so.1.0
    • /usr/lib/liblzma.so.5
    • /usr/lib/libzstd.so.1
    • /usr/lib/libicudata.so.65
    • /usr/lib/libicui18n.so.65
    • /usr/lib/libicuuc.so.65
    • /usr/lib64/ld-linux-x86-64.so.2
    • /usr/lib/libdl.so.2

gbd Information

I'm not a C developer and don't really know how to use gdb effectively, but here's at least some information:

Reading symbols from ./axmldec...
(gdb) run
Starting program: /home/ser/Software/axmldec/axmldec /home/ser/workspace/TimeTracker/bin/TimeTracker.apk
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
  refcounts = ['_M_refcount']['_M_pi']

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78dd897 in fseeko64 () from /usr/lib/libc.so.6
(gdb) where
#0  0x00007ffff78dd897 in fseeko64 () from /usr/lib/libc.so.6
#1  0x000055555558cc90 in fseek64_file_func ()
#2  0x000055555558a5af in unzOpenInternal ()
#3  0x000055555556fb85 in extract_manifest (input_filename=...)
    at /usr/include/c++/9.2.0/bits/basic_string.h:2300
#4  0x00005555555703b2 in process_file (
    input_filename="/home/ser/workspace/TimeTracker/bin/TimeTracker.apk", output_filename="")
    at /home/ser/Software/axmldec/main.cpp:125
#5  0x000055555556f616 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/ser/Software/axmldec/main.cpp:188
(gdb) list
127             jitana::read_axml(ims, pt);
128         }
129         else if (ifs.peek() == 0x03) {
130             jitana::read_axml(ifs, pt);
131         }
132         else {
133             boost_pt::read_xml(ifs, pt, boost_pt::xml_parser::trim_whitespace);
134         }
135
136         // Write the tree as an XML file.
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant