[Bug 215686] (Possibly theoretical) race condition in kern.devstat.all sysctl
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Dec 31 16:09:22 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215686
Bug ID: 215686
Summary: (Possibly theoretical) race condition in
kern.devstat.all sysctl
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: shea at shealevy.com
The code path which copies out devstat nodes to the sysctl req does not use the
necessary barriers to make the 'sequence0' and 'sequence1' fields meaningful.
For any given device, it's possible that matching sequence numbers would be
exported to userspace while the rest of the structure is otherwise
inconsistent.
>From my reading of devstat_start_transaction and devstat_end_transaction, we
want to ensure that none of the field reads are reordered to be before the read
of sequence0 and none are reordered to be after the read of sequence1, thus
ensuring that if the sequence numbers match, the data in the structure is a
consistent snapshot of some point in time.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list