summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-07-26 15:48:53 +0800
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-08-20 09:30:50 -0400
commite2751463eaa6f9fec8fea80abbdc62dbc487b3c5 (patch)
treed93c22073541a054fe08b0744cd4772341f3c087 /net/sunrpc
parentd1abaeb3be7b5fa6d7a1fbbd2e14e3310005c4c1 (diff)
fs: nfs: Fix possible null-pointer dereferences in encode_attrs()
In encode_attrs(), there is an if statement on line 1145 to check whether label is NULL: if (label && (attrmask[2] & FATTR4_WORD2_SECURITY_LABEL)) When label is NULL, it is used on lines 1178-1181: *p++ = cpu_to_be32(label->lfs); *p++ = cpu_to_be32(label->pi); *p++ = cpu_to_be32(label->len); p = xdr_encode_opaque_fixed(p, label->label, label->len); To fix these bugs, label is checked before being used. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
0 files changed, 0 insertions, 0 deletions