Home

rebind

Rebind is a term used in multiple technical contexts to describe the act of binding something again or binding to a different target.

In programming, rebind most commonly appears in the context of allocator design in C++. The allocator concept

In computer networking, rebinding can refer to the process of binding a socket to a (potentially different)

In security and web contexts, DNS rebinding describes a class of attacks where an attacker manipulates DNS

Beyond these domains, rebind appears as a general term in discussions of reattaching, reassigning, or reestablishing

in
older
C++
standards
exposed
a
nested
member
template
called
rebind,
which
provides
an
allocator
for
another
type
from
an
existing
allocator.
For
example,
std::allocator<T>::rebind<U>::other
yields
an
allocator<U>
that
shares
the
same
underlying
allocation
strategy.
With
the
advent
of
allocator_traits
in
modern
C++,
explicit
rebind
usage
has
diminished,
but
the
concept
remains
in
legacy
code
and
discussions
of
allocator
compatibility.
local
address
or
port,
sometimes
by
closing
and
reopening
the
socket
or
by
altering
binding
options.
The
operation
is
distinct
from
the
initial
bind,
and
its
feasibility
and
behavior
depend
on
the
operating
system
and
socket
options
such
as
SO_REUSEADDR
or
SO_REUSEPORT.
Rebinding
issues
can
arise
when
addresses
are
in
use,
when
interfaces
change,
or
when
a
program
needs
to
switch
the
local
endpoint
it
uses
for
outgoing
or
incoming
connections.
responses
to
cause
a
victim’s
browser
to
make
requests
to
a
private
internal
IP
address.
This
can
bypass
certain
network
protections
and
violate
same-origin
policies.
Mitigations
include
enforcing
strict
same-origin
policies,
limiting
DNS
caching
behavior,
and
implementing
network-level
or
application-level
boundaries
to
prevent
unauthorized
access
to
internal
services.
bindings
in
various
systems
and
APIs.