diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2020-04-01 21:10:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-02 09:35:32 -0700 |
commit | aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd (patch) | |
tree | 68c1de97cf7b4653313a39427c5ad63a05f9dacc /net/dsa/tag_8021q.c | |
parent | d888fb2b189be07df1656a31930b11a62ae88e58 (diff) | |
download | linux-aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd.tar.bz2 |
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
Using an empty (malformed) nodelist that is not caught during mount option
parsing leads to a stack-out-of-bounds access.
The option string that was used was: "mpol=prefer:,". However,
MPOL_PREFERRED requires a single node number, which is not being provided
here.
Add a check that 'nodes' is not empty after parsing for MPOL_PREFERRED's
nodeid.
Fixes: 095f1fc4ebf3 ("mempolicy: rework shmem mpol parsing and display")
Reported-by: Entropy Moe <3ntr0py1337@gmail.com>
Reported-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Link: http://lkml.kernel.org/r/89526377-7eb6-b662-e1d8-4430928abde9@infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/dsa/tag_8021q.c')
0 files changed, 0 insertions, 0 deletions