Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jun 2022 13:22:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 264468] libc: fix possible integer underflow
Message-ID:  <bug-264468-227-DeZMF60PGT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-264468-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-264468-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264468

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open
                 CC|                            |markj@FreeBSD.org

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
In all three cases, orig_buf_size and buffer_size are unsigned.  So in the
comparison "orig_buf_size < buffer_size - sizeof(struct protoent) - sizeof(=
char
*)", if underflow occurs, the right-hand side will wrap around to a large v=
alue
and the comparison will evaluate to true, causing __proto_unmarshal_func() =
to
return an error.  Also note that "buffer_size" is directly set by the calle=
r,
the generic NSS cache code starts the buffer size at
NSS_CACHE_BUFFER_INITIAL_SIZE (1KB) and grows it.  So, I don't quite see the
problem here - can you explain further?

BTW, the attached patch does not seem to compile.

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



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