[RTEMS Project] #4519: record-main-lttng.cc: Out-of-bounds access

RTEMS trac trac at rtems.org
Thu Sep 30 19:55:28 UTC 2021


#4519: record-main-lttng.cc: Out-of-bounds access
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  tool       |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1503017: Out-of-bounds access in CopyThreadName().
 {{{
    1. Condition api_index < 3, taking false branch.
 298  if (api_index < THREAD_API_COUNT) {
 299    name = thread_names_[api_index][GetObjIndexOfID(item.data)];
 300  } else {
    2. alias: Assigning: name = kEmptyThreadName. name now points to byte 0
 of kEmptyThreadName (which consists of 3 bytes).
 301    name = kEmptyThreadName;
 302  }
 303
    CID 1503017 (#1 of 1): Out-of-bounds access (OVERRUN)3. overrun-buffer-
 arg: Overrunning buffer pointed to by name of 3 bytes by passing it to a
 function which accesses it at byte offset 15 using argument 16UL.
 304  std::memcpy(dst, name, THREAD_NAME_SIZE);
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4519>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list