lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 10 Aug 2022 18:39:23 +0000
From:   "Dhupar, Rishi" <>
To:     "" <>
CC:     "Gero, Charlie" <>
Subject: Question - bind(2) to local route on main routing table


We recently discovered an inconsistency in the behavior of bind(2) with respect to a type local route being added to the main table. 

I was able to track down the issue and it appears it was introduced in this commit[1] which merged the local and main fib tries for performance and which are then later unmerged once the RPDB is modified.

Synopsis: a user can bind(2) to any address within the prefix of a type local route that has been added to the main routing table

Short example on an untainted Ubuntu 22.04 machine
$ ip route add local dev lo table main
$ nc -n -s -l -p 9999                      # Succeeds
$ ip rule add table 100                            # This can be any change to RPDB
$ nc -n -s -l -p 9999
Can't grab with bind : Cannot assign requested address

Note: This also impacts implicit bind behavior wrt to system calls such as connect(2).

Does this warrant further investigation and/or possibly a patch to disallow this behavior?

Rishi Dhupar

Powered by blists - more mailing lists