Report information
The Basics
Id:
39607
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
(no value)
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
(no value)
Severity:
(no value)
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
(no value)

Dates
Created:Fri, 22 May 2015 06:49:47 -0400
Updated:Fri, 07 Jul 2017 19:46:12 -0400
Closed:Tue, 09 Jun 2015 09:20:38 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: DEADCODE in lib/dns/rrl.c:1168
Date: Fri, 22 May 2015 12:49:40 +0200
To: bind9-bugs@isc.org
From: "Tomas Hozza" <thozza@redhat.com>
Hi. Coverity found a deadcode in lib/dns/rrl.c 1. bind-9.9.4/lib/dns/rrl.c:1162: cond_at_least: Condition "rrl_all_result != DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" is at least 1. 2. bind-9.9.4/lib/dns/rrl.c:1166: assignment: Assigning: "rrl_result" = "rrl_all_result". 3. bind-9.9.4/lib/dns/rrl.c:1167: at_least: At condition "rrl_result == DNS_RRL_RESULT_OK", the value of "rrl_result" must be at least 1. 4. bind-9.9.4/lib/dns/rrl.c:1162: cond_cannot_single: Condition "rrl_all_result != DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" cannot be equal to 0. 5. bind-9.9.4/lib/dns/rrl.c:1167: cannot_single: At condition "rrl_result == DNS_RRL_RESULT_OK", the value of "rrl_result" cannot be equal to 0. 6. bind-9.9.4/lib/dns/rrl.c:1167: dead_error_condition: The condition "rrl_result == DNS_RRL_RESULT_OK" cannot be true. 7. bind-9.9.4/lib/dns/rrl.c:1168: dead_error_line: Execution cannot reach this statement: "level = 4;". # 1166| rrl_result = rrl_all_result; # 1167| if (rrl_result == DNS_RRL_RESULT_OK) # 1168|-> level = DNS_RRL_LOG_DEBUG2; # 1169| else # 1170| level = DNS_RRL_LOG_DEBUG1; https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=blob;f=lib/dns/rrl.c;h=766d007514c01f85e5c43c0c40610783aeba1b41;hb=HEAD#l1163 There is a check on line 1163, assignment on line 1167, therefore the condition "if (rrl_result == DNS_RRL_RESULT_OK)" on line 1168 can never be TRUE. I'm not sure what was the intention here. Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com
Subject: Re: [ISC-Bugs #39607] DEADCODE in lib/dns/rrl.c:1168
Date: Fri, 22 May 2015 16:32:08 +0530
To: "Tomas Hozza via RT" <bind9-bugs@isc.org>
From: "Mukund Sivaraman" <muks@isc.org>
Hi Tomas On Fri, May 22, 2015 at 10:49:48AM +0000, Tomas Hozza via RT wrote: > Coverity found a deadcode in lib/dns/rrl.c > > 1. bind-9.9.4/lib/dns/rrl.c:1162: cond_at_least: Condition "rrl_all_result != > DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" is at > least 1. > 2. bind-9.9.4/lib/dns/rrl.c:1166: assignment: Assigning: "rrl_result" = > "rrl_all_result". > 3. bind-9.9.4/lib/dns/rrl.c:1167: at_least: At condition "rrl_result == > DNS_RRL_RESULT_OK", the value of "rrl_result" must be at least 1. > 4. bind-9.9.4/lib/dns/rrl.c:1162: cond_cannot_single: Condition "rrl_all_result > != DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" > cannot be equal to 0. > 5. bind-9.9.4/lib/dns/rrl.c:1167: cannot_single: At condition "rrl_result == > DNS_RRL_RESULT_OK", the value of "rrl_result" cannot be equal to 0. > 6. bind-9.9.4/lib/dns/rrl.c:1167: dead_error_condition: The condition > "rrl_result == DNS_RRL_RESULT_OK" cannot be true. > 7. bind-9.9.4/lib/dns/rrl.c:1168: dead_error_line: Execution cannot reach this > statement: "level = 4;". > # 1166| rrl_result = rrl_all_result; > # 1167| if (rrl_result == DNS_RRL_RESULT_OK) > # 1168|-> level = DNS_RRL_LOG_DEBUG2; > # 1169| else > # 1170| level = DNS_RRL_LOG_DEBUG1; > > https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=blob;f=lib/dns/rrl.c;h=766d007514c01f85e5c43c0c40610783aeba1b41;hb=HEAD#l1163 > There is a check on line 1163, assignment on line 1167, > therefore the condition "if (rrl_result == DNS_RRL_RESULT_OK)" on line > 1168 can never be TRUE. This has been fixed in ISC-Bugs #39537 (Fwd: New Defects reported by Coverity Scan for BIND). The ticket is in review. Mukund

Message body not shown because it is not plain text.

Subject: Re: [ISC-Bugs #39607] DEADCODE in lib/dns/rrl.c:1168
Date: Fri, 22 May 2015 22:22:07 +1000
To: bind9-bugs@isc.org
From: "Mark Andrews" <marka@isc.org>
Already being addressed. In message <rt-4.2.8-33051-1432291788-1728.39607-3-0@isc.org>, "Tomas Hozza via RT" writes: > > Fri May 22 10:49:48 2015: Request 39607 was acted upon. > Transaction: Ticket created by thozza@redhat.com > Queue: bind9 > Subject: DEADCODE in lib/dns/rrl.c:1168 > Owner: Nobody > Requestors: thozza@redhat.com > Status: new > Ticket <URL: https://bugs.isc.org/Ticket/Display.html?id=39607 > > ----------------------------------------------------------------------- > > Hi. > > Coverity found a deadcode in lib/dns/rrl.c > > > 1. bind-9.9.4/lib/dns/rrl.c:1162: cond_at_least: Condition "rrl_all_result != > DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" is > at > least 1. > 2. bind-9.9.4/lib/dns/rrl.c:1166: assignment: Assigning: "rrl_result" = > "rrl_all_result". > 3. bind-9.9.4/lib/dns/rrl.c:1167: at_least: At condition "rrl_result == > DNS_RRL_RESULT_OK", the value of "rrl_result" must be at least 1. > 4. bind-9.9.4/lib/dns/rrl.c:1162: cond_cannot_single: Condition "rrl_all_resu > lt > != DNS_RRL_RESULT_OK", taking true branch. Now the value of "rrl_all_result" > cannot be equal to 0. > 5. bind-9.9.4/lib/dns/rrl.c:1167: cannot_single: At condition "rrl_result == > DNS_RRL_RESULT_OK", the value of "rrl_result" cannot be equal to 0. > 6. bind-9.9.4/lib/dns/rrl.c:1167: dead_error_condition: The condition > "rrl_result == DNS_RRL_RESULT_OK" cannot be true. > 7. bind-9.9.4/lib/dns/rrl.c:1168: dead_error_line: Execution cannot reach thi > s > statement: "level = 4;". > # 1166| rrl_result = rrl_all_result; > # 1167| if (rrl_result == DNS_RRL_RESULT_OK) > # 1168|-> level = DNS_RRL_LOG_DEBUG2; > # 1169| else > # 1170| level = DNS_RRL_LOG_DEBUG1; > > https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=blob;f=lib/dns/rrl.c; > h=766d007514c01f85e5c43c0c40610783aeba1b41;hb=HEAD#l1163 > There is a check on line 1163, assignment on line 1167, > therefore the condition "if (rrl_result == DNS_RRL_RESULT_OK)" on line > 1168 can never be TRUE. > > I'm not sure what was the intention here. > > Regards, > -- > Tomas Hozza > Software Engineer - EMEA ENG Developer Experience > > PGP: 1D9F3C2D > Red Hat Inc. http://cz.redhat.com > > -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org