Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Oct 2024 10:14:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 281938] [PATCH] Make sure max_len is not 0 before using it as modulo
Message-ID:  <bug-281938-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281938

            Bug ID: 281938
           Summary: [PATCH] Make sure max_len is not 0 before using it as
                    modulo
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: nakayamakenjiro@gmail.com

Created attachment 254089
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=254089&action=edit
proposal patch

In tcp_default_output(), max_len is calculated and used as modulo:

```
        max_len = tp->t_maxseg - optlen - ipsec_optlen;
              ...
              moff = len % max_len;
```

optlen and ipsec_optlen are variables and depend on the options, so it
should be checked if max_len is not zero.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281938-227>