Bug 975490 - Additional flags might have no effect on 32bit architectures
Additional flags might have no effect on 32bit architectures
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libtevent (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
:
Depends On: 975488
Blocks: 975489
  Show dependency treegraph
 
Reported: 2013-06-18 11:08 EDT by Jakub Hrozek
Modified: 2013-08-01 23:46 EDT (History)
5 users (show)

See Also:
Fixed In Version: libtevent-0.9.18-2.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 975488
Environment:
Last Closed: 2013-06-28 02:12:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jakub Hrozek 2013-06-18 11:08:20 EDT
+++ This bug was initially created as a clone of Bug #975488 +++

Description of problem:
Samba upstream found via Coverity check that the latest tevent (which we rebase to in 5.10) contains a bug. There is an assignment from uint64_t to unsigned int and later a comparison against UINT64_t. On 32bit platforms, "unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false.

Version-Release number of selected component (if applicable):
0.9.18

How reproducible:
N/A

Steps to Reproduce:
1. don't reproduce, just sanity testing.
2.
3.

Actual results:


Expected results:


Additional info:

$ git log  dd0e38b5feb51c8aa44e76bb6c84202bf8373005 -1 -p
commit dd0e38b5feb51c8aa44e76bb6c84202bf8373005
Author: Volker Lendecke <vl@samba.org>
Date:   Thu Jun 13 20:35:32 2013 +0200

    tevent: Fix Coverity ID 989236 Operands don't affect result
    
    "unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false.
    
    Signed-off-by: Volker Lendecke <vl@samba.org>
    Reviewed-by: Jeremy Allison <jra@samba.org>

diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index c6e2a00..75d0ced 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -546,7 +546,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
           the handler to remove itself when called */
 
        for (fde = ev->fd_events; fde; fde = fde->next) {
-               unsigned idx = fde->additional_flags;
+               uint64_t idx = fde->additional_flags;
                struct pollfd *pfd;
                uint16_t flags = 0;
Comment 1 Fedora Update System 2013-06-19 07:28:25 EDT
libtevent-0.9.18-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libtevent-0.9.18-2.fc19
Comment 2 Fedora Update System 2013-06-19 07:28:37 EDT
libtevent-0.9.18-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libtevent-0.9.18-2.fc18
Comment 3 Fedora Update System 2013-06-19 22:32:47 EDT
Package libtevent-0.9.18-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libtevent-0.9.18-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11294/libtevent-0.9.18-2.fc18
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-06-28 02:12:26 EDT
libtevent-0.9.18-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2013-08-01 23:46:47 EDT
libtevent-0.9.18-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.