Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
u-boot-cubieboard2.16979
0018-CVE-2019-14196-nfs-fix-unbounded-me.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0018-CVE-2019-14196-nfs-fix-unbounded-me.patch of Package u-boot-cubieboard2.16979
From f06d7fbc47d9b1c00cff1475df76fa61907e9745 Mon Sep 17 00:00:00 2001 From: "liucheng (G)" <liucheng32@huawei.com> Date: Thu, 29 Aug 2019 13:48:02 +0000 Subject: [PATCH] CVE-2019-14196: nfs: fix unbounded memcpy with a failed length check at nfs_lookup_reply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply. Signed-off-by: Cheng Liu <liucheng32@huawei.com> Reported-by: FermÃn Serna <fermin@semmle.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit 5d14ee4e53a81055d34ba280cb8fd90330f22a96) Signed-off-by: Matthias Brugger <mbrugger@suse.com> --- net/nfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/nfs.c b/net/nfs.c index a8bf184874..dc1a672671 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -566,11 +566,15 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len) } if (supported_nfs_versions & NFSV2_FLAG) { + if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + NFS_FHSIZE) > len) + return -NFS_RPC_DROP; memcpy(filefh, rpc_pkt.u.reply.data + 1, NFS_FHSIZE); } else { /* NFSV3_FLAG */ filefh3_length = ntohl(rpc_pkt.u.reply.data[1]); if (filefh3_length > NFS3_FHSIZE) filefh3_length = NFS3_FHSIZE; + if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + filefh3_length) > len) + return -NFS_RPC_DROP; memcpy(filefh, rpc_pkt.u.reply.data + 2, filefh3_length); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor