EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Bug 1776141] Re: Buffer overrun in dbpr with long INP field
From: Launchpad Bug Tracker via Core-talk <core-talk at aps.anl.gov>
To: core-talk at aps.anl.gov
Date: Mon, 16 Nov 2020 19:34:15 -0000
** Merge proposal linked:
   https://code.launchpad.net/~info-martin-konrad/epics-base/+git/epics-base/+merge/393873

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1776141

Title:
  Buffer overrun in dbpr with long INP field

Status in EPICS Base:
  Fix Released
Status in EPICS Base 3.15 series:
  In Progress
Status in EPICS Base 3.16 series:
  Fix Released
Status in EPICS Base 7.0 series:
  Fix Released

Bug description:
  softIoc crashes with a buffer overflow in dbTest.c:1152 when running
  "dbpr A 4" on the attached database file (test.db).

  Root cause: pmsg points to msgBuff->message which has a fixed size of
  128 but the output of sprintf can be longer.

  I can see two potential solutions here:

  1. Use snprintf() to prevent the buffer overflow.
  2. Convert the file to C++ and use strings.

  Note: dbTest.c contains a total of 23 sprintf() calls so there might
  be potential for more issues...

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1776141/+subscriptions

Navigate by Date:
Prev: Jenkins build is back to normal : epics-example-linux32 #809 APS Jenkins via Core-talk
Next: [Bug 1776141] Re: Buffer overrun in dbpr with long INP field Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: epics-pva2pva-linux32 - Build # 200 - Fixed! APS Jenkins via Core-talk
Next: [Bug 1776141] Re: Buffer overrun in dbpr with long INP field Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024