Commit 1c4561d
net: limit altnames to 64k total
[ Upstream commit 155fb43 ]
Property list (altname is a link "property") is wrapped
in a nlattr. nlattrs length is 16bit so practically
speaking the list of properties can't be longer than
that, otherwise user space would have to interpret
broken netlink messages.
Prevent the problem from occurring by checking the length
of the property list before adding new entries.
Reported-by: George Shuklin <george.shuklin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 601f748 commit 1c4561d
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3631 | 3631 | | |
3632 | 3632 | | |
3633 | 3633 | | |
| 3634 | + | |
3634 | 3635 | | |
3635 | 3636 | | |
3636 | 3637 | | |
3637 | 3638 | | |
3638 | 3639 | | |
3639 | 3640 | | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
3640 | 3651 | | |
3641 | 3652 | | |
3642 | 3653 | | |
| |||
0 commit comments