Bug 1943411 - CVE-2021-3500 djvulibre: Stack overflow in function DJVU::DjVuDocument::get_djvu_file() via crafted djvu file [fedora-all]
Summary: CVE-2021-3500 djvulibre: Stack overflow in function DJVU::DjVuDocument::get_d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: djvulibre
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marek Kašík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2021-3500
TreeView+ depends on / blocked
 
Reported: 2021-03-26 02:13 UTC by 1vanChen
Modified: 2021-11-26 08:50 UTC (History)
4 users (show)

Fixed In Version: djvulibre-3.5.27-24.fc32 djvulibre-3.5.27-27.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-25 15:21:09 UTC
Type: Bug


Attachments (Terms of Use)
poc file (623 bytes, image/vnd.djvu+multipage)
2021-03-26 02:13 UTC, 1vanChen
no flags Details
Patch fixing the stack overflow (1014 bytes, patch)
2021-04-08 09:35 UTC, Marek Kašík
no flags Details | Diff

Description 1vanChen 2021-03-26 02:13:46 UTC
Created attachment 1766467 [details]
poc file

Stack overflow  in function ` DJVU::DjVuDocument::get_djvu_file`  when input craft djvu file 



To Reproduce

```shell
./ddjvu ./poc.djvu
```

Debug Info

```shell
# ./ddjvu ./poc.djvu
==24065==ERROR: AddressSanitizer: stack-overflow on address 0x7ffff2067f70 (pc 0x0000004c8aaa bp 0x7ffff20687a0 sp 0x7ffff2067f70 T1)
    #0 0x4c8aaa in StackTrace /local/mnt/workspace/tmp/final/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_stacktrace.h:53:45
    #1 0x4c8aaa in BufferedStackTrace /local/mnt/workspace/tmp/final/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_stacktrace.h:98:26
    #2 0x4c8aaa in operator new(unsigned long) /local/mnt/workspace/tmp/final/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #3 0x75b6ca in DJVU::GP<DJVU::GStringRep> DJVU::GStringRep::create<DJVU::GStringRep::UTF8>(unsigned int, DJVU::GStringRep::UTF8*) /src/djvulibre-ddjvu/libdjvu/GString.cpp:1005:17
    #4 0x760043 in DJVU::GStringRep::UTF8::blank(unsigned int) const /src/djvulibre-ddjvu/libdjvu/GString.cpp:217:11
    #5 0x75e87c in DJVU::GStringRep::substr(char const*, int, int) const /src/djvulibre-ddjvu/libdjvu/GString.cpp:1068:14
    #6 0x75de54 in DJVU::GStringRep::UTF8::create(char const*, int, int) /src/djvulibre-ddjvu/libdjvu/GString.cpp:195:16
    #7 0x7781c3 in DJVU::GUTF8String::GUTF8String(char const*, unsigned int) /src/djvulibre-ddjvu/libdjvu/GString.cpp:2605:8
    #8 0x77f229 in DJVU::GURL::protocol(DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/GURL.cpp:490:12
    #9 0x7807f4 in DJVU::GURL::protocol() const /src/djvulibre-ddjvu/libdjvu/./GURL.h:414:11
    #10 0x789525 in DJVU::GURL::is_local_file_url() const /src/djvulibre-ddjvu/libdjvu/GURL.cpp:904:12
    #11 0x5bfd66 in DJVU::DataPool::get_data(void*, int, int, int) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1168:18
    #12 0x5c001d in DJVU::DataPool::get_data(void*, int, int, int) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1155:22
    #13 0x5c001d in DJVU::DataPool::get_data(void*, int, int, int) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1155:22
    #14 0x5c45eb in DJVU::PoolByteStream::read(void*, unsigned long) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1707:32
    #15 0x59a259 in DJVU::ByteStream::readall(void*, unsigned long) /src/djvulibre-ddjvu/libdjvu/ByteStream.cpp:410:20
    #16 0x79a32c in DJVU::IFFByteStream::get_chunk(DJVU::GUTF8String&, int*, int*) /src/djvulibre-ddjvu/libdjvu/IFFByteStream.cpp:209:17
    #17 0x61486a in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:696:11
    #18 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #19 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #20 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #21 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #22 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #23 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #24 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #25 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #26 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #27 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #28 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #29 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #30 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #31 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #32 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #33 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #34 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #35 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #36 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #37 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #38 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #39 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #40 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #41 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #42 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #43 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #44 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #45 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #46 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #47 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #48 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #49 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #50 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #51 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #52 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #53 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #54 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #55 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #56 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #57 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #58 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #59 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #60 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #61 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #62 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #63 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #64 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #65 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #66 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #67 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #68 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #69 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #70 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #71 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #72 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #73 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #74 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #75 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #76 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #77 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #78 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #79 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #80 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #81 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #82 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #83 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #84 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #85 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #86 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #87 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #88 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #89 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #90 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #91 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #92 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #93 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #94 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #95 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #96 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #97 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #98 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #99 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #100 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #101 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #102 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #103 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #104 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #105 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #106 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #107 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #108 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #109 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #110 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #111 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #112 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #113 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #114 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #115 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #116 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #117 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #118 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #119 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #120 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #121 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #122 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #123 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #124 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #125 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #126 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #127 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #128 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #129 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #130 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #131 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #132 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #133 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #134 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #135 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #136 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #137 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #138 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #139 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #140 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #141 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #142 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #143 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #144 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #145 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #146 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #147 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #148 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #149 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #150 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #151 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #152 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #153 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #154 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #155 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #156 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #157 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #158 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #159 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #160 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #161 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #162 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #163 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #164 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #165 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #166 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #167 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #168 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #169 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #170 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #171 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #172 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #173 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #174 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #175 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #176 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #177 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #178 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #179 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #180 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #181 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #182 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #183 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #184 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #185 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #186 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #187 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #188 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #189 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #190 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #191 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #192 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #193 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #194 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #195 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #196 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #197 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #198 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #199 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #200 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #201 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #202 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #203 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #204 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #205 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #206 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #207 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #208 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #209 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #210 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #211 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #212 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #213 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #214 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #215 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #216 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #217 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #218 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #219 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #220 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #221 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #222 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #223 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #224 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #225 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #226 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #227 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #228 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #229 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #230 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #231 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #232 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #233 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #234 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #235 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #236 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #237 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21
    #238 0x614ba3 in DJVU::DjVuFile::process_incl_chunks() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:711:13
    #239 0x62d839 in DJVU::DjVuFile::trigger_cb() /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1925:5
    #240 0x612c9c in DJVU::DjVuFile::static_trigger_cb(void*) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:1904:41
    #241 0x5bc010 in DJVU::call_callback(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:90:9
    #242 0x5b6eff in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/DataPool.cpp:1505:9
    #243 0x6136c6 in DJVU::DjVuFile::init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:251:14
    #244 0x61313a in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:216:9
    #245 0x5f828f in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:891:12
    #246 0x5fa6fd in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1047:28
    #247 0x5f9dbe in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1034:10
    #248 0x60073d in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:1439:24
    #249 0x69915a in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) /src/djvulibre-ddjvu/libdjvu/DjVuPort.cpp:513:28
    #250 0x61a8d8 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) /src/djvulibre-ddjvu/libdjvu/DjVuFile.cpp:597:21

SUMMARY: AddressSanitizer: stack-overflow /local/mnt/workspace/tmp/final/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_stacktrace.h:53:45 in StackTrace
Thread T1 created by T0 here:
    #0 0x4838ba in pthread_create /local/mnt/workspace/tmp/final/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:214:3
    #1 0x77b5a0 in DJVU::GThread::create(void (*)(void*), void*) /src/djvulibre-ddjvu/libdjvu/GThreads.cpp:440:13
    #2 0x5eb6e5 in DJVU::DjVuDocument::start_init(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuFileCache*) /src/djvulibre-ddjvu/libdjvu/DjVuDocument.cpp:208:13
    #3 0x52e0e3 in ddjvu_document_create_by_filename_imp(DJVU::ddjvu_context_s*, char const*, int, int) /src/djvulibre-ddjvu/libdjvu/ddjvuapi.cpp:1027:15
    #4 0x4ded9e in main /src/djvulibre-ddjvu/tools/ddjvu.cpp:1205:16
    #5 0x7ffff651a83f in __libc_start_main /build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:291

==24065==ABORTING
```

I think the root cause of this bug is the wrong use of the overloaded function of get_djvu_file. But I can’t locate the error location specifically .


Environment:

- version : djvulibre master (ee314b880c926e884be77d53ee459d9850c9c7f0)
- OS: Ubuntu 16.04
- clang version: 11


Credit: 1vanChen of NSFOCUS Security Team

Comment 1 1vanChen 2021-03-30 01:31:47 UTC
this bug can also reproduce in evince-thumbnailer 

gdb /usr/bin/evince-thumbnailer core.1348110                                                                                                                                     
GNU gdb (GDB) Fedora 10.1-4.fc33                                                                                                                                                              
Copyright (C) 2020 Free Software Foundation, Inc.                                                                                                                                             
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>                                                                                                                 
This is free software: you are free to change and redistribute it.                                                                                                                            
There is NO WARRANTY, to the extent permitted by law.                                                                                                                                         
Type "show copying" and "show warranty" for details.                                                                                                                                          
This GDB was configured as "x86_64-redhat-linux-gnu".                                                                                                                                         
Type "show configuration" for configuration details.                                                                                                                                          
For bug reporting instructions, please see:                                                                                                                                                   
<https://www.gnu.org/software/gdb/bugs/>.                                                                                                                                                     
Find the GDB manual and other documentation resources online at:                                                                                                                              
    <http://www.gnu.org/software/gdb/documentation/>.                                                                                                                                         
                                                                                                                                                                                              
For help, type "help".                                                                                                                                                                        
Type "apropos word" to search for commands related to "word"...                                                                                                                               
Reading symbols from /usr/bin/evince-thumbnailer...                                                                                                                                           
Reading symbols from .gnu_debugdata for /usr/bin/evince-thumbnailer...                                                                                                                        
(No debugging symbols found in .gnu_debugdata for /usr/bin/evince-thumbnailer)                                                                                                                
                                                                                                                                                                                              
warning: core file may not match specified executable file.                                                                                                                                   
[New LWP 1348113]                                                                                                                                                                             
[New LWP 1348112]                                                                                                                                                                             
[New LWP 1348110]                                                                                                                                                                             
[New LWP 1348111]                                                                                                                                                                             
[Thread debugging using libthread_db enabled]                                                                                                                                                 
Using host libthread_db library "/lib64/libthread_db.so.1".                                                                                                                                   
Core was generated by `evince-thumbnailer -s 128 file:///home/henices/%E4%B8%8B%E8%BD%BD/tests_310bb59'.                                                                                      
Program terminated with signal SIGSEGV, Segmentation fault.                                                                                                                                   
#0  0x00007f44a99be66b in __vfprintf_internal () from /lib64/libc.so.6                                                                                                                        
[Current thread is 1 (Thread 0x7f449bfff640 (LWP 1348113))]                                                                                                                                   
Missing separate debuginfos, use: dnf debuginfo-install evince-thumbnailer-3.38.2-2.fc33.x86_64                                                                                               
(gdb) bt                                                                                                                                                                                      
#0  0x00007f44a99be66b in __vfprintf_internal () at /lib64/libc.so.6                                                                                                                          
#1  0x00007f44a99d13ba in __vsnprintf_internal () at /lib64/libc.so.6                                                                                                                         
#2  0x00007f44a09fbff1 in DJVU::GStringRep::vformat(__va_list_tag*) const () at /lib64/libdjvulibre.so.21
#3  0x00007f44a0a0259a in DJVU::GStringRep::UTF8::create(char const*, __va_list_tag (&) [1]) () at /lib64/libdjvulibre.so.21
#4  0x00007f44a0a026a3 in DJVU::GUTF8String::format(char const*, ...) () at /lib64/libdjvulibre.so.21
#5  0x00007f44a09a075c in DJVU::DjVuDocument::get_int_prefix() const () at /lib64/libdjvulibre.so.21
#6  0x00007f44a09aa599 in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const () at /lib64/libdjvulibre.so.21
#7  0x00007f44a09a8436 in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) () at /lib64/libdjvulibre.so.21
#8  0x00007f44a09ac84a in DJVU::DjVuDocument::get_djvu_file(DJVU::GUTF8String const&, bool) () at /lib64/libdjvulibre.so.21
#9  0x00007f44a09accd6 in DJVU::DjVuDocument::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) () at /lib64/libdjvulibre.so.21
#10 0x00007f44a09d6a90 in DJVU::DjVuPortcaster::id_to_file(DJVU::DjVuPort const*, DJVU::GUTF8String const&) () at /lib64/libdjvulibre.so.21
#11 0x00007f44a09b3099 in DJVU::DjVuFile::process_incl_chunk(DJVU::ByteStream&, int) () at /lib64/libdjvulibre.so.21
#12 0x00007f44a09b34a3 in DJVU::DjVuFile::process_incl_chunks() () at /lib64/libdjvulibre.so.21
#13 0x00007f44a09b8700 in DJVU::DjVuFile::trigger_cb() () at /lib64/libdjvulibre.so.21
#14 0x00007f44a09bae66 in DJVU::DjVuFile::static_trigger_cb(void*) () at /lib64/libdjvulibre.so.21
#15 0x00007f44a09820e5 in DJVU::DataPool::add_trigger(int, int, void (*)(void*), void*) () at /lib64/libdjvulibre.so.21
#16 0x00007f44a09b22ed in DJVU::DjVuFile::create(DJVU::GURL const&, DJVU::GP<DJVU::DjVuPort>, DJVU::DjVuPort::ErrorRecoveryAction, bool) () at /lib64/libdjvulibre.so.21
#17 0x00007f44a09aa6f0 in DJVU::DjVuDocument::url_to_file(DJVU::GURL const&, bool) const () at /lib64/libdjvulibre.so.21
#18 0x00007f44a09a8436 in DJVU::DjVuDocument::get_djvu_file(DJVU::GURL const&, bool) () at /lib64/libdjvulibre.so.21
....

Comment 2 Marek Kašík 2021-04-08 09:35:45 UTC
Created attachment 1770188 [details]
Patch fixing the stack overflow

Thank you for reporting this bug!

The issue is that djvulibre tries to open a file inside the djvu file while already opening it and this goes on and on.
I've broken this cycle by remembering which file it is opening. I've stored the name in DjVuPortcaster class since it is common to these actions.

Comment 3 1vanChen 2021-04-11 12:55:44 UTC
(In reply to Marek Kašík from comment #2)
> Created attachment 1770188 [details]
> Patch fixing the stack overflow
> 
> Thank you for reporting this bug!
> 
> The issue is that djvulibre tries to open a file inside the djvu file while
> already opening it and this goes on and on.
> I've broken this cycle by remembering which file it is opening. I've stored
> the name in DjVuPortcaster class since it is common to these actions.

This patch looks great! I cannot reproduce this bug after applying this patch.

Comment 4 Ben Cotton 2021-11-04 14:02:20 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-11-04 14:31:31 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2021-11-04 15:29:13 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Marek Kašík 2021-11-25 15:21:09 UTC
This has been fixed quite some time ago (since Fedora 32).


Note You need to log in before you can comment on or make changes to this bug.