public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106140] New: RFE: analyzer could complain about misuses of socket APIs
@ 2022-06-29 22:14 dmalcolm at gcc dot gnu.org
  2022-07-23  1:13 ` [Bug analyzer/106140] " egallager at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-06-29 22:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106140

            Bug ID: 106140
           Summary: RFE: analyzer could complain about misuses of socket
                    APIs
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
            Blocks: 106003
  Target Milestone: ---

POSIX has numerous API entrypoints for working with sockets, and, presumably,
numerous ways of misusing them.  They're expressed in terms of
file-descriptors, and so checking them would interact with PR 106003.

One specific example: the Juliet 1.3 testsuite 
  https://samate.nist.gov/SARD/test-suites
has a subdirectory:

  C/testcases/CWE666_Operation_on_Resource_in_Wrong_Phase_of_Lifetime/

which has e.g. tests that sockets have calls to:
  bind then listen then accept  (good)
rather than, say:
  accept then bind then listen  (bad)

This could be modeled as part of a state machine, possibly as part of the FD
state machine.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106003
[Bug 106003] RFE: -fanalyzer could complain about misuse of file-descriptors

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

end of thread, other threads:[~2022-11-28 22:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 22:14 [Bug analyzer/106140] New: RFE: analyzer could complain about misuses of socket APIs dmalcolm at gcc dot gnu.org
2022-07-23  1:13 ` [Bug analyzer/106140] " egallager at gcc dot gnu.org
2022-10-31 14:15 ` dmalcolm at gcc dot gnu.org
2022-11-08  3:03 ` dmalcolm at gcc dot gnu.org
2022-11-15 18:59 ` cvs-commit at gcc dot gnu.org
2022-11-15 19:11 ` dmalcolm at gcc dot gnu.org
2022-11-15 19:13 ` dmalcolm at gcc dot gnu.org
2022-11-28 22:20 ` pinskia at gcc dot gnu.org

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).