diff options
| author | Yuejie Shi <syjcnss@gmail.com> | 2017-03-31 15:10:20 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-08-31 01:38:22 +0200 |
| commit | 1cfef9113c108bc9f30da9dd69d73031505990cf (patch) | |
| tree | e032afb9befbbe1708da465894d2e7fa37d21656 /lib | |
| parent | 106376e8e92e5e0a05b311cdd0eb380a14bd265d (diff) | |
af_key: Add lock to key dump
commit 89e357d83c06b6fac581c3ca7f0ee3ae7e67109e upstream.
A dump may come in the middle of another dump, modifying its dump
structure members. This race condition will result in NULL pointer
dereference in kernel. So add a lock to prevent that race.
Fixes: 83321d6b9872 ("[AF_KEY]: Dump SA/SP entries non-atomically")
Signed-off-by: Yuejie Shi <syjcnss@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
[bwh: Backported to 3.2:
- pfkey_dump() doesn't support filters
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
