diff options
| author | Dan Carpenter <[email protected]> | 2017-10-25 10:04:47 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2017-10-25 10:10:59 +0000 |
| commit | 092e72c9edab16d4d6ad10c683a95047d53b6db4 (patch) | |
| tree | 83b287433e6af410d15432ba9466ca7dc70d01e6 /net/switchdev/switchdev.c | |
| parent | Merge tag 'nfs-for-4.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs (diff) | |
| download | kernel-092e72c9edab16d4d6ad10c683a95047d53b6db4.tar.gz kernel-092e72c9edab16d4d6ad10c683a95047d53b6db4.zip | |
efi/efi_test: Prevent an Oops in efi_runtime_query_capsulecaps()
If "qcaps.capsule_count" is ULONG_MAX then "qcaps.capsule_count + 1"
will overflow to zero and kcalloc() will return the ZERO_SIZE_PTR. We
try to dereference it inside the loop and crash.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Ivan Hu <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Fixes: ff6301dabc3c ("efi: Add efi_test driver for exporting UEFI runtime service interfaces")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
