diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2019-03-13 07:56:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:39:53 +0200 |
commit | 556b7d910d5de6b1608250c14f9f6694ec3e2628 (patch) | |
tree | eab3454ef4da246dfe4ce29e4536423cfb11a7aa /scripts/gdb/linux/utils.py | |
parent | 78dbc2482a7810c6db544c31ee1bc601b4a1cfc8 (diff) |
dm integrity: change memcmp to strncmp in dm_integrity_ctr
commit 0d74e6a3b6421d98eeafbed26f29156d469bc0b5 upstream.
If the string opt_string is small, the function memcmp can access bytes
that are beyond the terminating nul character. In theory, it could cause
segfault, if opt_string were located just below some unmapped memory.
Change from memcmp to strncmp so that we don't read bytes beyond the end
of the string.
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions