mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 18:40:09 +01:00
platform/netlink: fix overrun in attribute iteration in nla_ok()
See-also:123dc07bccSee-also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1045b03e07d85f3545118510a587035536030c1c (cherry picked from commitc295d45a3b) (cherry picked from commitec1c512e40)
This commit is contained in:
parent
89b7f638ed
commit
dcec33798e
1 changed files with 1 additions and 1 deletions
|
|
@ -252,7 +252,7 @@ struct nlattr *nla_find (const struct nlattr *head, int len, int attrtype);
|
|||
static inline int
|
||||
nla_ok (const struct nlattr *nla, int remaining)
|
||||
{
|
||||
return remaining >= sizeof(*nla) &&
|
||||
return remaining >= (int) sizeof(*nla) &&
|
||||
nla->nla_len >= sizeof(*nla) &&
|
||||
nla->nla_len <= remaining;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue