RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2040609 - the libnbd OCaml bindings map C's "uint32_t" type to OCaml's "int32" type
Summary: the libnbd OCaml bindings map C's "uint32_t" type to OCaml's "int32" type
Keywords:
Status: CLOSED DUPLICATE of bug 2040610
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libnbd
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: Vera
URL:
Whiteboard:
Depends On:
Blocks: 2027598
TreeView+ depends on / blocked
 
Reported: 2022-01-14 08:46 UTC by Laszlo Ersek
Modified: 2022-01-14 10:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-14 10:15:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-108159 0 None None None 2022-01-14 08:50:16 UTC

Description Laszlo Ersek 2022-01-14 08:46:07 UTC
* Description of problem:
The 



* Version-Release number of selected component (if applicable):
libnbd-1.10.2-1.el9

* How reproducible:
Dependent on the guest disk image being copied with virt-v2v, if there is a segment >= 2GiB in size with identical block allocation status, NBD.block_status will return an entry with negative "length" in the entries array.

* Steps to Reproduce:
Refer to <https://bugzilla.redhat.com/show_bug.cgi?id=2027598#c61> and onwards.

* Actual results:
Refer to <https://bugzilla.redhat.com/show_bug.cgi?id=2027598#c40> and onwards -- the "Utils.get_disk_allocated" function in virt-v2v, which is supposed to make progress in every interation of its loop, will go backwards on occasion, and decay into an infinite loop.

* Expected results:
The OCaml bindings should faithfully represent uint32_t values >= 0x8000_0000. More closely, "Utils.get_disk_allocated" in virt-v2v should always terminate.

* Additional info:
(1) This is arguably a (mild) security bug, but our analysis in <https://bugzilla.redhat.com/show_bug.cgi?id=2027598#c61> is already public.

(2) The same issue exists for C's uint64_t <-> OCaml's int64 -- this is in fact a bug (or limitation) in OCaml's type system. We can't do anything about that, at the moment, as there is no OCaml type we could widen uint64_t to. (At least we can widen C's uint32_t to OCaml's int64.)

Comment 1 Richard W.M. Jones 2022-01-14 10:15:38 UTC

*** This bug has been marked as a duplicate of bug 2040610 ***


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