Files
kernel_xiaomi_sm8250/kernel
Suren Baghdasaryan 67e4408599 UPSTREAM: sched/psi: Fix OOB write when writing 0 bytes to PSI files
Issuing write() with count parameter set to 0 on any file under
/proc/pressure/ will cause an OOB write because of the access to
buf[buf_size-1] when NUL-termination is performed. Fix this by checking
for buf_size to be non-zero.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lkml.kernel.org/r/20200203212216.7076-1-surenb@google.com

(cherry picked from commit 6fcca0fa48118e6d63733eb4644c6cd880c15b8f)

Bug: 148159562
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9ec7acfc6e1083c677a95b0ea1c559ab50152873
2020-02-28 15:30:25 +00:00
..
2020-02-24 09:13:25 +01:00
2020-02-05 19:20:26 +00:00
2020-01-27 15:55:44 +01:00
2020-02-11 15:05:03 -08:00
2019-05-17 16:05:09 -07:00
2020-01-09 16:14:43 +01:00
2020-02-11 15:05:03 -08:00
2020-02-24 09:13:25 +01:00
2019-12-13 08:51:11 +01:00
2019-05-31 06:46:17 -07:00
2019-12-01 09:17:17 +01:00
2020-02-24 09:13:25 +01:00
2020-01-27 15:55:44 +01:00
2019-12-01 09:17:38 +01:00
2020-01-15 14:51:23 +00:00
2019-12-01 09:53:43 +01:00
2020-02-24 09:13:25 +01:00
2019-08-12 13:36:37 -04:00
2020-01-27 15:55:44 +01:00
2020-01-09 10:18:59 +01:00
2019-03-06 15:59:21 +00:00