Project

General

Profile

Actions

Bug #3816

closed

Coverity scan issue -- null pointer deref in reject dev handling

Added by Jeff Lucovsky almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description


** CID 1465223:  Null pointer dereferences  (FORWARD_NULL)

________________________________________________________________________________________________________
*** CID 1465223:  Null pointer dereferences  (FORWARD_NULL)
/src/suricata.c: 1538 in ParseCommandLine()
1532     #endif /* WINDIVERT */
1533                 } else if(strcmp((long_opts[option_index]).name,
"reject-dev") == 0) {
1534     #ifdef HAVE_LIBNET11
1535                     extern char *g_reject_dev;
1536                     extern uint16_t g_reject_dev_mtu;
1537                     g_reject_dev = optarg;
>>>     CID 1465223:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "g_reject_dev" to "GetIfaceMTU", which dereferences it.
1538                     int mtu = GetIfaceMTU(g_reject_dev);
1539                     if (mtu > 0) {
1540                         g_reject_dev_mtu = (uint16_t)mtu;
1541                     }
1542     #else
1543                     SCLogError(SC_ERR_LIBNET_NOT_ENABLED,

Actions #1

Updated by Victor Julien over 3 years ago

  • Target version set to 6.0.0rc1
Actions #2

Updated by Victor Julien over 3 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF