<html>
    <head>
      <base href="https://bugzilla.netfilter.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - nft segfault on overlapping intervals"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1361">1361</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>nft segfault on overlapping intervals
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>nftables
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Debian GNU/Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>nft
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pablo@netfilter.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arturo@debian.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Bug reported in the Debian bug tracker:
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932878">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932878</a>

Original message follows:


While studying RFC 4890 I ran into parsing problems.
I have narrowed it down to the ruleset below.

Note the typo ("174" should be "147") results in overlapping intervals
with conflicting verdicts.

I think this should result in an error rather than a segfault.


    #!/usr/sbin/nft --file
    delete chain inet x y
    table inet x {
        chain y {
            icmpv6 type vmap {
                144 - 174 : accept,
                154 - 199 : drop,
            }
        }
    }


               PID: 8941 (nft)
               UID: 0 (root)
               GID: 0 (root)
            Signal: 11 (SEGV)
         Timestamp: Wed 2019-07-24 14:37:13 AEST (45s ago)
      Command Line: nft --file tmp.nft
        Executable: /usr/sbin/nft
     Control Group: /user.slice/user-0.slice/session-25.scope
              Unit: session-25.scope
             Slice: user-0.slice
           Session: 25
         Owner UID: 0 (root)
           Boot ID: d7a30c4dec804cd08fbd79e513dfbc16
        Machine ID: ee3c68006daf4086b06772170d63f3f6
          Hostname: not-omega
           Storage:
/var/lib/systemd/coredump/core.nft.0.d7a30c4dec804cd08fbd79e513dfbc16.8941.1563943033000000.lz4
           Message: Process 8941 (nft) of user 0 dumped core.

                    Stack trace of thread 8941:
                    #0  0x00007f1d5d9fb39b set_to_intervals (libnftables.so.1)
                    #1  0x00007f1d5d9dcd2f n/a (libnftables.so.1)
                    #2  0x00007f1d5d9df2c7 do_command (libnftables.so.1)
                    #3  0x00007f1d5da02320 n/a (libnftables.so.1)
                    #4  0x00007f1d5da02cdc nft_run_cmd_from_filename
(libnftables.so.1)
                    #5  0x00005637f2eaa5f0 main (nft)
                    #6  0x00007f1d5d73809b __libc_start_main (libc.so.6)
                    #7  0x00005637f2eaa68a _start (nft)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>