diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2014-12-30 00:48:09 (GMT) |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2015-03-20 14:34:42 (GMT) |
commit | 6250a8badb311953a49bedb16ed17eb59d21c03a (patch) | |
tree | 53432ea0f158736b5a1f839935098cfba577d2c4 /ipc/msg.c | |
parent | b642f7269bd40ae9abe9cff01581b2eb5e2c2287 (diff) | |
download | linux-6250a8badb311953a49bedb16ed17eb59d21c03a.tar.xz |
9p: use unsigned integers for nwqid/count
As specification says, all integers in messages are unsigned. Let's fix
behaviour of p9pdu_vreadf()/p9pdu_vwritef() accordingly.
Fix for p9pdu_vreadf() is critical. If server replies with Rwalk, where
nwqid > SHRT_MAX, the value will be interpreted as negative. kmalloc, in
its order, will cast the value to (very big) size_t.
It should never happen in normal situation: we never submit Twalk with
nwname > 16, but malicious or broken server can still produce
problematic Rwalk.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'ipc/msg.c')
0 files changed, 0 insertions, 0 deletions