2

Today we've encountered an stack buffer underflow reported by gcc 10.2 && gcc 11 asan.

Looking into asan's output, we found that it points to following shadow byte pattern:

 someaddr =>  [f1]f1 f3 f3 f3
where
  f1 is stack left redzone
  f3 is stack right redzone.

It looks suspicious to me that there are no addressable bytes between stack left and right red zones. Could you please explain under what circumstances can such shadow layout occur?

yugr
  • 19,769
  • 3
  • 51
  • 96
tdiff
  • 113
  • 7
  • 1
    Indeed, this means you have a zero-length object on stack. Do you have a small repro? – yugr Aug 28 '21 at 11:12
  • Unfortunately no, we tried to extract a minimum example, but it still includes quite a few pieces of internal logic. – tdiff Aug 29 '21 at 08:29

0 Answers0