diff options
| author | Alex Markuze <amarkuze@redhat.com> | 2026-10-20 08:47:30 +0000 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2026-10-26 14:15:48 +0100 |
| commit | 823d21c78453fcdf58dbd8ecefbb41f4f3eb6540 (patch) | |
| tree | 2dee0c7a9240ac69c0194dd441c2ce37b8a0d029 /tools/lib/python | |
| parent | 269c779c1be9621373c07a5515251be0e1f5fdb8 (diff) | |
ceph: fix uninitialized err in ceph_netfs_issue_read()
ceph_netfs_issue_read() declares err without an initializer. On the
unencrypted, non-sparse success path nothing assigns it, then the
out: label does if (err) netfs_read_subreq_terminated(subreq).
With CONFIG_INIT_STACK_ALL_PATTERN, err is 0xaaaaaaaa (nonzero), so
the subrequest is terminated while the OSD READ is still in flight.
netfs then frees the rolling buffer that the OSD iterator still
points at, causing a KASAN UAF / oops, and finish_netfs_read()
terminates the same subrequest a second time. CONFIG_INIT_STACK_ALL_ZERO
hides it because err happens to be 0.
Restore the err = 0 initializer so a successful submit leaves
completion to finish_netfs_read() only.
Cc: stable@vger.kernel.org
Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
Reported-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Alex Markuze <amarkuze@redhat.com>
Reviewed-by: Xiubo Li <xiubo.li@clyso.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
