Jia-Ju Bai
e2751463ea
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 >
2019-08-20 09:30:50 -04:00
..
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-07-18 15:50:28 -04:00
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2019-07-09 10:30:25 -04:00
2019-04-24 09:46:34 -04:00
2019-04-24 09:46:35 -04:00
2018-08-09 12:56:38 -04:00
2019-07-06 14:54:53 -04:00
2019-08-04 22:35:40 -04:00
2019-08-04 22:35:40 -04:00
2019-07-12 16:01:37 -04:00
2019-05-21 10:50:45 +02:00
2019-06-27 23:02:12 +01:00
2017-11-02 11:10:55 +01:00
2018-06-04 12:07:07 -04:00
2019-05-21 10:50:45 +02:00
2019-05-24 17:27:11 +02:00
2019-08-04 22:35:41 -04:00
2019-08-04 22:35:41 -04:00
2019-05-30 11:26:32 -07:00
2019-07-06 14:54:52 -04:00
2019-07-12 16:01:37 -04:00
2019-02-20 15:14:21 -05:00
2017-11-02 11:10:55 +01:00
2019-05-21 10:50:46 +02:00
2019-07-06 14:54:49 -04:00
2019-04-26 16:00:48 -04:00
2019-05-21 10:50:45 +02:00
2019-07-06 14:54:49 -04:00
2019-05-21 10:50:45 +02:00
2019-07-09 10:30:25 -04:00
2017-11-02 11:10:55 +01:00
2019-02-20 17:33:55 -05:00
2019-07-06 14:54:50 -04:00
2018-12-19 13:52:46 -05:00
2019-05-21 10:50:45 +02:00
2019-07-09 10:30:25 -04:00
2019-08-04 22:35:40 -04:00
2019-08-04 22:35:40 -04:00
2019-07-18 14:32:33 -07:00
2017-11-02 11:10:55 +01:00
2019-07-10 18:43:43 -07:00
2015-04-23 15:16:14 -04:00
2019-02-20 15:14:21 -05:00
2019-08-07 12:55:11 -04:00
2018-12-19 13:52:46 -05:00
2019-05-21 10:50:45 +02:00
2019-03-02 16:25:26 -05:00
2019-08-07 12:55:11 -04:00
2019-05-21 10:50:45 +02:00
2018-01-18 15:10:47 -05:00
2019-07-18 15:50:28 -04:00
2019-07-18 15:50:28 -04:00
2019-08-20 09:30:50 -04:00
2019-03-01 16:20:16 -05:00
2019-04-11 15:23:48 -04:00
2019-03-01 16:20:16 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-02-13 12:03:21 -05:00
2019-07-09 10:30:25 -04:00
2019-07-06 14:54:52 -04:00
2019-03-01 22:37:38 -05:00
2019-05-21 10:50:45 +02:00
2019-08-04 22:35:40 -04:00
2019-04-25 14:18:15 -04:00
2018-12-19 13:52:46 -05:00
2019-05-21 10:50:45 +02:00
2019-08-04 22:35:41 -04:00
2019-05-09 16:26:57 -04:00
2017-11-02 11:10:55 +01:00
2019-07-06 14:54:49 -04:00
2019-07-06 14:54:49 -04:00
2019-06-20 14:47:44 +02:00
2019-07-06 14:54:52 -04:00