Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.
Reach gvfs · 4 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
A flaw was found in the MTP backend in gvfs. When reading a file from a mounted MTP device, do_read() in gvfsbackendmtp.c trusts the data length returned by the device without limiting it to the original size requested by the client. If a malicious MTP device responds with more bytes than requested, this unrestricted length is passed directly to memcpy(). This causes the operation to read memory outside the intended boundaries. This allows an attacker who plugs in a malicious MTP device to cause a segmentation fault when a file is read and crash the gvfsd-mtp process, resulting in a denial of service.
Published 2026-09-01NVD
CVSS 3.1Physical · no privileges · user interaction
How it is reached
- Attack vector
- Physical
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
What it costs
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
The CVE is in the MTP backend (do_read() in daemon/gvfsbackendmtp.c, shipped as gvfsd-mtp). Buildroot hard-codes -Dmtp=false for gvfs, so that file is never compiled and no gvfsd-mtp binary exists in the image.
The unfixed code is present in the unpacked 1.48.1 source (the unbounded memcpy (buffer, temp, actual)), and no applied patch touches it, so the version match is correct. The build is not affected only because the feature is compiled out.
Evidence 10
`GVFS_CONF_OPTS` unconditionally passes `-Dmtp=false` (comment: "Most of these are missing library support"); no Kconfig option can turn it on.
buildroot/package/gvfs/gvfs.mk:27-33
The actual configure invocation included `-Dmtp=false`; the option summary at lines 1793 and 1840 reports `mtp : false`.
output/build/gvfs-1.48.1/buildroot-build/meson-logs/meson-log.txt:3
`#undef HAVE_LIBMTP` (and `#undef HAVE_GUDEV` at line 24, which the MTP backend requires).
output/build/gvfs-1.48.1/buildroot-build/config.h:30
`gvfsd-mtp` (source `gvfsbackendmtp.c`) is only added to the build under `if enable_mtp`.
output/build/gvfs-1.48.1/daemon/meson.build:416-434
Zero matches for `gvfsbackendmtp`, `gvfsd-mtp` or `libmtp` here and in `compile_commands.json`: the file is not compiled.
output/build/gvfs-1.48.1/buildroot-build/build.ninja
Installed daemons are `gvfsd`, `gvfsd-afp`, `gvfsd-afp-browse`, `gvfsd-burn`, `gvfsd-computer`, `gvfsd-dnssd`, `gvfsd-ftp`, `gvfsd-localtest`, `gvfsd-metadata`, `gvfsd-network`, `gvfsd-recent`, `gvfsd-trash`; there is no `gvfsd-mtp`, and no file matching `*mtp*` from gvfs anywhere under `output/target`.
output/target/usr/libexec/
`BR2_PACKAGE_LIBGUDEV` and `BR2_PACKAGE_LIBUSB` are not set, and there is no `LIBMTP` symbol in `output/.config`; the libraries the MTP backend needs are not in the image.
output/.config:2466,2488
The source itself is unfixed: `actual` returned by `LIBMTP_GetPartialObject()` is passed straight to `memcpy (buffer, temp, actual)` without being limited to `bytes_requested`. This code is present but not compiled.
output/build/gvfs-1.48.1/daemon/gvfsbackendmtp.c:2507-2515
Only `0001-build-Remove-incorrect-i18n.merge_file-argument.patch` is applied; it is a build-system fix unrelated to the CVE.
output/build/gvfs-1.48.1/.applied_patches_list
`BR2_PACKAGE_GVFS=y`: the package itself is selected for the target image.
output/.config:1312
Version and patches
The version match is correct: the 1.48.1 source in output/build/gvfs-1.48.1/daemon/gvfsbackendmtp.c:2515 contains the unbounded memcpy, and the single applied patch (0001-build-Remove-incorrect-i18n.merge_file-argument.patch) does not fix it. I could not consult the upstream advisory or fix commit (no network access), so the exact affected range and fixed version are not confirmed. The build is not affected because the MTP backend is disabled at configure time (-Dmtp=false), not because of a fix.
Recommendation
Document as not applicable: the MTP backend is not compiled (-Dmtp=false in buildroot/package/gvfs/gvfs.mk). No upgrade or backport is needed for this CVE.
Re-evaluate if gvfs.mk is ever changed to enable mtp (which would also need libmtp and libgudev), since the source in the tree is unfixed.
Open questions
Upstream's fixed version and affected range were not verified, as the advisory and GNOME issue 864 are not available from the tree. This does not change the verdict.
I did not determine which package or defconfig line selects BR2_PACKAGE_GVFS: my one check of configs/x86_64_defconfig for it returned nothing. That is also irrelevant to this CVE.
Members of Kernel Kit decide. Sign in if you are one.