public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Usage of C11 Annex K Bounds-checking interfaces on GCC
@ 2019-12-10  6:13 li zi
  2019-12-10  6:22 ` Andrew Pinski
  0 siblings, 1 reply; 11+ messages in thread
From: li zi @ 2019-12-10  6:13 UTC (permalink / raw)
  To: gcc-info, gcc

Hi All,
We are using gcc in our projects and we found some of the C standard functions (like memcpy, strcpy) used in gcc may induce security vulnerablities like buffer overflow. Currently we have not found any instances which causes such issues.
But we feel better to change these calls to Cll Annex K Bounds-checking interfaces like memcpy_s, strcpy_s etc. By defining a secure calls method (list of func pointers) and allowing application to register the method. I understand that this affects performance because of return value check added for xxxx_s calls, but this will relieve overflow kind of issues from code. And also currently using bounds-checking interfaces is a general industry practice.
Please share your opinion on it, and if any discussion happened in community to do some changes in future.

Thanks.
li



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Usage of C11 Annex K Bounds-checking interfaces on GCC
@ 2019-12-10  3:15 li zi
  2019-12-14 17:36 ` Martin Sebor
  0 siblings, 1 reply; 11+ messages in thread
From: li zi @ 2019-12-10  3:15 UTC (permalink / raw)
  To: gcc-info, gcc

Hi All,
We are using gcc in our projects and we found some of the C standard functions (like memcpy, strcpy) used in gcc may induce security vulnerablities like buffer overflow. Currently we have not found any instances which causes such issues.
But we feel better to change these calls to Cll Annex K Bounds-checking interfaces like memcpy_s, strcpy_s etc. By defining a secure calls method (list of func pointers) and allowing application to register the method. I understand that this affects performance because of return value check added for xxxx_s calls, but this will relieve overflow kind of issues from code. And also currently using bounds-checking interfaces is a general industry practice.
Please share your opinion on it, and if any discussion happened in community to do some changes in future.

Thanks.

获取 Outlook for Android<https://aka.ms/ghei36>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-16  7:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10  6:13 Usage of C11 Annex K Bounds-checking interfaces on GCC li zi
2019-12-10  6:22 ` Andrew Pinski
2019-12-10 10:52   ` Jonathan Wakely
  -- strict thread matches above, loose matches on Subject: below --
2019-12-10  3:15 li zi
2019-12-14 17:36 ` Martin Sebor
2019-12-15  1:59   ` Jeffrey Walton
2019-12-15 18:25     ` David Brown
2019-12-15 20:02       ` Jeffrey Walton
2019-12-16  2:43         ` Liu Hao
2019-12-16  3:45           ` Jeffrey Walton
2019-12-16  7:52           ` Didier Kryn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).