mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 15:30:14 +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)
This commit is contained in:
parent
8f1631c679
commit
ec1c512e40
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,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