diff options
author | Philip Langdale <philipl@overt.org> | 2017-11-10 07:59:42 -0800 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2017-11-19 07:49:43 -0800 |
commit | 08612cd495fd3a10e83041dd2245385d05a24e07 (patch) | |
tree | 1a877219728bd0b5e25dcb556a224cf802181b37 /daemon/gvfsbackend.h | |
parent | b46a9587481e0a8d7f06ef5e77b1c1ed404ab0db (diff) | |
download | gvfs-08612cd495fd3a10e83041dd2245385d05a24e07.tar.gz |
mtp: Handle read-past-EOF in GetPartialObject(64) ourselves
Up until very recently, the Android MTP driver did not do bounds checking
on reads past EOF, leading to undefined behaviour, which includes
hanging the transfer on some devices.
According to Google engineers, this is fixed in the kernels used by
the Pixel and Pixel 2 (and this has been verified in testing), but
that basically means that every other Android device in existence has
this bug, and is unlikely to ever be fixed.
So, we need to enforce POSIX semantics ourselves and truncate reads
past EOF. libmtp has implemented a check, but we should validate as
well so that we have working behaviour without requiring a libmtp
update.
https://bugzilla.gnome.org/show_bug.cgi?id=784477
Diffstat (limited to 'daemon/gvfsbackend.h')
0 files changed, 0 insertions, 0 deletions