[valgrind] [Bug 405201] Incorrect size of struct vki_siginfo on 64-bit Linux architectures

2019-03-10 Thread Dmitry V. Levin
https://bugs.kde.org/show_bug.cgi?id=405201

Dmitry V. Levin  changed:

   What|Removed |Added

URL||https://sourceforge.net/p/v
   ||algrind/mailman/message/366
   ||06811/

--- Comment #2 from Dmitry V. Levin  ---
(In reply to Julian Seward from comment #1)
> Do you have a patch to fix this?

https://sourceforge.net/p/valgrind/mailman/message/36606811/

Besides that, Eugene is working on a test for this bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 405201] New: Incorrect size of struct vki_siginfo on 64-bit Linux architectures

2019-03-07 Thread Dmitry V. Levin
https://bugs.kde.org/show_bug.cgi?id=405201

Bug ID: 405201
   Summary: Incorrect size of struct vki_siginfo on 64-bit Linux
architectures
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: memcheck
  Assignee: jsew...@acm.org
  Reporter: l...@altlinux.org
  Target Milestone: ---

strace's "make check-valgind-memcheck" produces false reports about
out-of-bounds writes on ptrace(PTRACE_GETSIGINFO) invocations on x86_64.

This turned out to be a bug in the definition of struct vki_siginfo: its size
is 136 which exceeds VKI_SI_MAX_SIZE==128 by 8 bytes.

As all 64-bit architectures have union _sifields aligned to wordsize
boundary, there is a hole between the preamble and _sifields.

Unfortunately, __VKI_ARCH_SI_PREAMBLE_SIZE doesn't take this into account,
this results to off-by-one bug in VKI_SI_PAD_SIZE and the whole structure being
8 bytes larger on 64-bit architectures.

-- 
You are receiving this mail because:
You are watching all bug changes.