Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-14 Thread Philippe Mathieu-Daudé
On 13/4/23 19:19, Stefan Hajnoczi wrote: If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was f

Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-14 Thread Alexander Bulekov
On 230413 1319, Stefan Hajnoczi wrote: > If the driver sets large_send_mss to 0 then a divide-by-zero occurs. > Even if the division wasn't a problem, the for loop that emits MSS-sized > packets would never terminate. > > Solve these issues by skipping offloading when large_send_mss=0. > > This i

Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-14 Thread Michael Tokarev
13.04.2023 20:19, Stefan Hajnoczi wrote: If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. Cc: qemu-sta...

Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-13 Thread Jason Wang
On Fri, Apr 14, 2023 at 2:24 AM Peter Maydell wrote: > > On Thu, 13 Apr 2023 at 18:21, Stefan Hajnoczi wrote: > > > > If the driver sets large_send_mss to 0 then a divide-by-zero occurs. > > Even if the division wasn't a problem, the for loop that emits MSS-sized > > packets would never terminate

Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-13 Thread Peter Maydell
On Thu, 13 Apr 2023 at 18:21, Stefan Hajnoczi wrote: > > If the driver sets large_send_mss to 0 then a divide-by-zero occurs. > Even if the division wasn't a problem, the for loop that emits MSS-sized > packets would never terminate. > > Solve these issues by skipping offloading when large_send_ms

[PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-13 Thread Stefan Hajnoczi
If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was found by OSS-Fuzz as part of Alexander Bulek