diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-29 16:35:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-18 08:56:56 +0200 |
commit | aa04486c419d7a8b4032549a11bd46acb1b6d0ac (patch) | |
tree | 6c13f6fc58a35c48493632db9e6e9060b6b40c88 /fs/ceph/super.h | |
parent | c18b28e5ade866aa858feaed429af4deaf87029e (diff) | |
download | linux-stable-aa04486c419d7a8b4032549a11bd46acb1b6d0ac.tar.gz linux-stable-aa04486c419d7a8b4032549a11bd46acb1b6d0ac.tar.bz2 linux-stable-aa04486c419d7a8b4032549a11bd46acb1b6d0ac.zip |
i2c: dev: zero out array used for i2c reads from userspace
commit 86ff25ed6cd8240d18df58930bd8848b19fce308 upstream.
If an i2c driver happens to not provide the full amount of data that a
user asks for, it is possible that some uninitialized data could be sent
to userspace. While all in-kernel drivers look to be safe, just be sure
by initializing the buffer to zero before it is passed to the i2c driver
so that any future drivers will not have this issue.
Also properly copy the amount of data recvieved to the userspace buffer,
as pointed out by Dan Carpenter.
Reported-by: Eric Dumazet <edumazet@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ceph/super.h')
0 files changed, 0 insertions, 0 deletions