summaryrefslogtreecommitdiffstats
path: root/patch-5.17-redhat.patch
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2022-02-15 06:53:51 -0600
committerJustin M. Forbes <jforbes@fedoraproject.org>2022-02-15 06:53:51 -0600
commit0a6fd1833138331a6b9007e65f344a2fcb1a59f4 (patch)
tree37abc03110e731f2bd478764e083b90bf7630f50 /patch-5.17-redhat.patch
parentd093b9fca27f70468537ca14c0c7543cfad35312 (diff)
downloadkernel-0a6fd1833138331a6b9007e65f344a2fcb1a59f4.tar.gz
kernel-0a6fd1833138331a6b9007e65f344a2fcb1a59f4.tar.xz
kernel-0a6fd1833138331a6b9007e65f344a2fcb1a59f4.zip
kernel-5.17-0.rc4.d567f5db412e.97
* Tue Feb 15 2022 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.17-0.rc4.d567f5db412e.97] - mm/sparsemem: Fix 'mem_section' will never be NULL gcc 12 warning (Waiman Long) - tools: Fix use-after-free for realloc(..., 0) (Kees Cook) Resolves: rhbz# Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Diffstat (limited to 'patch-5.17-redhat.patch')
-rw-r--r--patch-5.17-redhat.patch30
1 files changed, 15 insertions, 15 deletions
diff --git a/patch-5.17-redhat.patch b/patch-5.17-redhat.patch
index c7be88cf8..9de2761b4 100644
--- a/patch-5.17-redhat.patch
+++ b/patch-5.17-redhat.patch
@@ -74,8 +74,8 @@
security/lockdown/Kconfig | 13 +
security/lockdown/lockdown.c | 1 +
security/security.c | 6 +
- tools/lib/subcmd/subcmd-util.h | 9 +-
- 77 files changed, 1748 insertions(+), 196 deletions(-)
+ tools/lib/subcmd/subcmd-util.h | 11 +-
+ 77 files changed, 1746 insertions(+), 200 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index f5a27f067db9..f4dc42f2f82a 100644
@@ -3436,24 +3436,24 @@ index 22261d79f333..20336365f864 100644
int security_perf_event_open(struct perf_event_attr *attr, int type)
{
diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h
-index 794a375dad36..7009fc176636 100644
+index 794a375dad36..b2aec04fce8f 100644
--- a/tools/lib/subcmd/subcmd-util.h
+++ b/tools/lib/subcmd/subcmd-util.h
-@@ -49,13 +49,12 @@ static NORETURN inline void die(const char *err, ...)
-
+@@ -50,15 +50,8 @@ static NORETURN inline void die(const char *err, ...)
static inline void *xrealloc(void *ptr, size_t size)
{
-- void *ret = realloc(ptr, size);
+ void *ret = realloc(ptr, size);
- if (!ret && !size)
- ret = realloc(ptr, 1);
-+ void *ret;
-+ if (!size)
-+ size = 1;
-+ ret = realloc(ptr, size);
- if (!ret) {
- ret = realloc(ptr, size);
+- if (!ret) {
+- ret = realloc(ptr, size);
- if (!ret && !size)
- ret = realloc(ptr, 1);
- if (!ret)
- die("Out of memory, realloc failed");
- }
+- if (!ret)
+- die("Out of memory, realloc failed");
+- }
++ if (!ret)
++ die("Out of memory, realloc failed");
+ return ret;
+ }
+