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

stack-buffer-overflow in function directblockRead(hdf/fractalhead.c:102) #82

Closed
fantasy7082 opened this issue Oct 25, 2019 · 2 comments
Closed

Comments

@fantasy7082
Copy link

fantasy7082 commented Oct 25, 2019

Hi, i found a stack-buffer-overflow bug in libmysofa v0.8(latest version from git), the details are below(ASAN):

/usr/local/libmysofa_ASAN/bin/mysofa2json 001-stackover 
ASAN:SIGSEGV

=================================================================
==2911==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc28c24f98 (pc 0x7f4656a43568 bp 0x7ffc28c257e0 sp 0x7ffc28c24f80 T0)
    #0 0x7f4656a43567 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98567)
    #1 0x40d0e9 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:102
    #2 0x40e0ec in indirectblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:295
    #3 0x40f722 in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:448
    #4 0x40a534 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:931
    #5 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #6 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #7 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #8 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #9 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #10 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #11 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #12 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #13 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #14 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #15 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #16 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #17 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #18 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #19 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #20 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #21 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #22 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #23 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #24 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #25 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #26 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #27 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #28 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #29 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #30 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #31 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #32 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #33 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #34 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #35 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #36 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #37 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #38 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #39 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #40 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #41 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #42 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #43 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #44 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #45 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #46 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #47 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #48 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #49 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #50 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #51 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #52 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #53 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #54 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #55 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #56 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #57 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #58 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #59 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #60 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #61 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #62 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #63 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #64 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #65 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #66 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #67 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #68 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #69 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #70 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #71 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #72 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #73 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #74 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #75 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #76 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #77 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #78 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #79 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #80 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #81 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #82 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #83 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #84 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #85 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #86 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #87 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #88 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #89 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #90 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #91 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #92 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #93 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #94 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #95 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #96 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #97 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #98 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #99 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #100 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #101 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #102 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #103 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #104 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #105 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #106 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #107 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #108 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #109 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #110 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #111 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #112 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #113 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #114 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #115 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #116 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #117 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #118 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #119 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #120 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #121 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #122 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #123 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #124 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #125 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #126 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #127 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #128 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #129 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #130 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #131 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #132 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #133 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #134 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #135 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #136 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #137 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #138 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #139 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #140 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #141 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #142 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #143 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #144 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #145 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #146 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #147 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #148 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #149 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #150 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #151 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #152 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #153 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #154 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #155 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #156 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #157 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #158 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #159 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #160 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #161 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #162 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #163 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #164 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #165 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #166 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #167 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #168 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #169 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #170 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #171 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #172 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #173 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #174 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #175 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #176 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #177 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #178 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #179 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #180 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #181 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #182 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #183 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #184 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #185 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #186 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #187 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #188 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #189 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #190 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #191 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #192 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #193 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #194 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #195 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #196 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #197 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #198 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #199 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #200 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #201 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #202 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #203 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #204 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #205 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #206 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #207 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #208 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #209 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #210 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #211 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #212 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #213 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #214 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #215 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #216 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #217 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #218 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #219 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #220 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #221 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #222 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #223 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #224 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #225 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #226 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #227 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #228 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #229 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #230 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #231 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #232 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #233 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #234 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #235 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #236 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #237 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #238 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #239 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #240 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #241 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #242 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #243 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #244 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #245 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #246 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #247 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #248 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201
    #249 0x40f74a in fractalheapRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:451
    #250 0x40a626 in dataobjectRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/dataobject.c:937
    #251 0x40d8d6 in directblockRead /home/libmysofa/libmysofa_asan/libmysofa/src/hdf/fractalhead.c:201

SUMMARY: AddressSanitizer: stack-overflow ??:0 malloc
==2911==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/001-stackover-libmysofa

@fantasy7082 fantasy7082 changed the title stack-buffer-underflow in function directblockRead(hdf/fractalhead.c:102) stack-buffer-overflow in function directblockRead(hdf/fractalhead.c:102) Oct 25, 2019
@umlaeute
Copy link
Collaborator

attaching the POC file directly to this issue (zipped):
001-stackover-libmysofa.zip

@hoene
Copy link
Owner

hoene commented Nov 24, 2019

Fixed

@hoene hoene closed this as completed Nov 24, 2019
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

3 participants