[Swan-dev] New Defects reported by Coverity Scan for antonyantony/libreswan

scan-admin at coverity.com scan-admin at coverity.com
Wed Jul 7 22:08:28 UTC 2021


Hi,

Please find the latest report on new defect(s) introduced to antonyantony/libreswan found with Coverity Scan.

3 new defect(s) introduced to antonyantony/libreswan found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1505731:  Uninitialized variables  (UNINIT)
/programs/pluto/connections.c: 3689 in fc_try()


________________________________________________________________________________________________________
*** CID 1505731:  Uninitialized variables  (UNINIT)
/programs/pluto/connections.c: 3689 in fc_try()
3683     			 * - a routed connection is preferrred
3684     			 * - given that, the smallest number of ID wildcards
3685     			 *   are preferred
3686     			 * - given that, the shortest CA pathlength is preferred
3687     			 * - given that, not switching is preferred
3688     			 */
>>>     CID 1505731:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "wildcards".
3689     			policy_prio_t prio =
3690     				PRIO_WEIGHT * routed(sr->routing) +
3691     				WILD_WEIGHT * (MAX_WILDCARDS - wildcards) +
3692     				PATH_WEIGHT * (MAX_CA_PATH_LEN - pathlen) +
3693     				(c == d ? 1 : 0) +
3694     				1;

** CID 1505730:    (UNINIT)
/programs/pluto/connections.c: 3421 in refine_host_connection()


________________________________________________________________________________________________________
*** CID 1505730:    (UNINIT)
/programs/pluto/connections.c: 3253 in refine_host_connection()
3247     			bool matching_requested_ca = match_requested_ca(requested_ca,
3248     							d->spd.this.ca,
3249     							&our_pathlen);
3250     
3251     			if (DBGP(DBG_BASE)) {
3252     				connection_buf b1, b2;
>>>     CID 1505730:    (UNINIT)
>>>     Using uninitialized value "wildcards" when calling "DBG_log".
3253     				DBG_log("refine_host_connection: checking "PRI_CONNECTION" against "PRI_CONNECTION", best=%s with match=%d(id=%d(%d)/ca=%d(%d)/reqca=%d(%d))",
3254     					pri_connection(c, &b1), pri_connection(d, &b2),
3255     					best_found != NULL ? best_found->name : "(none)",
3256     					matching_peer_id && matching_peer_ca && matching_requested_ca,
3257     					matching_peer_id, wildcards,
3258     					matching_peer_ca, peer_pathlen,
/programs/pluto/connections.c: 3421 in refine_host_connection()
3415     			 */
3416     
3417     			/*
3418     			 * d has passed all the tests.
3419     			 * We'll go with it if the Peer ID was an exact match.
3420     			 */
>>>     CID 1505730:    (UNINIT)
>>>     Using uninitialized value "wildcards".
3421     			if (matching_peer_id && wildcards == 0 &&
3422     			    peer_pathlen == 0 && our_pathlen == 0)
3423     			{
3424     				*fromcert = d_fromcert;
3425     				dbg("returning because exact peer id match");
3426     				return d;

** CID 1505729:  Uninitialized variables  (UNINIT)
/programs/pluto/connections.c: 3689 in fc_try()


________________________________________________________________________________________________________
*** CID 1505729:  Uninitialized variables  (UNINIT)
/programs/pluto/connections.c: 3689 in fc_try()
3683     			 * - a routed connection is preferrred
3684     			 * - given that, the smallest number of ID wildcards
3685     			 *   are preferred
3686     			 * - given that, the shortest CA pathlength is preferred
3687     			 * - given that, not switching is preferred
3688     			 */
>>>     CID 1505729:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "pathlen".
3689     			policy_prio_t prio =
3690     				PRIO_WEIGHT * routed(sr->routing) +
3691     				WILD_WEIGHT * (MAX_WILDCARDS - wildcards) +
3692     				PATH_WEIGHT * (MAX_CA_PATH_LEN - pathlen) +
3693     				(c == d ? 1 : 0) +
3694     				1;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq8aBKViEpsZ9KPFMeJd7kKMDjyzu82COVFw1h1aYx-2FtFrefiPxkohPqZgI7DsTRPR5L954NuJuE0J6c4ee-2B5kYRIQ8_Cir5ZFqEb-2Fpy-2FZDdTxjwNXxDWd37ZfwlkdBT1REyQ39cXGiOHECmGoFRBgdH6DGGUPOhyLyqBYzs2HKsWUB-2B5UuB4dd1aX-2FMgASmuEYGzjSG5gPRzZVy6uBHxh3-2FfIOXn5JdTkfvZYwsrh0QfN-2Bdbwju8nJ0UshBkWCQYqaqQudlQ3UtiX1ch9yjD9eynEX9HLDouIiD6VybmA-2Fu8DGKANsBYs0qBgjGB-2FRLZUQEbkg-3D

  To manage Coverity Scan email notifications for "swan-dev at lists.libreswan.org", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxUzCfl-2FUi6sRJtnGH1-2FWXEIl9xkb2JliKiAkqgdujeIgWYvUCIHO1g-2Ba8I-2B0nANYHmrw9-2B13a9hJ7YOPZRdlHcEQfoMvDvjqsfrRNzFQ8lscduvXP5RLkPig71dIKudxisZhk_Cir5ZFqEb-2Fpy-2FZDdTxjwNXxDWd37ZfwlkdBT1REyQ39cXGiOHECmGoFRBgdH6DGGUPOhyLyqBYzs2HKsWUB-2B5TJemkf6h-2Bn4htkSpQ7Q1yStCZTrFqY49Nwzqsc-2FHkCsT2553k2QManvlW9U7rLxdGHXYDgxSmbolft1tUleFFMQDD9pr9h8BglJXAlxKTpq4MPo2PfZZLFsaRFHPZ-2Fk2WgGgRuk-2Ba1Qlej0sDaobNI-3D



More information about the Swan-dev mailing list