Commit bdd3957
net: bridge: prevent too big nested attributes in br_fill_linkxstats()
After commit ff205bf ("netlink: add one debug check in nla_nest_end()")
syzbot found that br_fill_linkxstats() can send corrupted netlink packets.
Make sure the nested attribute size is bounded.
Fixes: a60c090 ("bridge: netlink: export per-vlan stats")
Reported-by: syzbot+a35f9259d08f907c06e6@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a0b0da3.050a0220.175f0c.0000.GAE@google.com/
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20260520114207.1394241-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 979c017 commit bdd3957
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1824 | 1824 | | |
1825 | 1825 | | |
1826 | 1826 | | |
| 1827 | + | |
1827 | 1828 | | |
1828 | 1829 | | |
1829 | 1830 | | |
| |||
1841 | 1842 | | |
1842 | 1843 | | |
1843 | 1844 | | |
| 1845 | + | |
1844 | 1846 | | |
1845 | 1847 | | |
1846 | 1848 | | |
| |||
1855 | 1857 | | |
1856 | 1858 | | |
1857 | 1859 | | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
1858 | 1863 | | |
1859 | 1864 | | |
1860 | 1865 | | |
1861 | 1866 | | |
1862 | 1867 | | |
1863 | 1868 | | |
1864 | 1869 | | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1865 | 1875 | | |
1866 | 1876 | | |
1867 | 1877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6328 | 6328 | | |
6329 | 6329 | | |
6330 | 6330 | | |
6331 | | - | |
6332 | | - | |
| 6331 | + | |
| 6332 | + | |
| 6333 | + | |
6333 | 6334 | | |
6334 | 6335 | | |
6335 | 6336 | | |
| |||
0 commit comments