$ git log -p slirp/tcp_subr.c commit 345fab6ffe57b0bf6dccbc0844f45f77b91d9de0 Author: Prasad J Pandit <[email protected]> Date: Sun Jan 13 23:29:48 2019 +0530
slirp: check data length while emulating ident function
While emulating identification protocol, tcp_emu() does not check available space in the 'sc_rcv->sb_data' buffer. It could lead to heap buffer overflow issue. Add check to avoid it.
$ git show 345fab6ffe57b0bf6dccbc0844f45f77b91d9de0 commit 345fab6ffe57b0bf6dccbc0844f45f77b91d9de0 Author: Prasad J Pandit <[email protected]> Date: Sun Jan 13 23:29:48 2019 +0530
slirp: check data length while emulating ident function
While emulating identification protocol, tcp_emu() does not check available space in the 'sc_rcv->sb_data' buffer. It could lead to heap buffer overflow issue. Add check to avoid it.
git blame slirp/tcp_subr.c f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 1) /* f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 2) * Copyright (c) 1982, 1986, 1988, 1990, 1993 f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 3) * The Regents of the University of California. All rights reserved. f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 4) * f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 5) * Redistribution and use in source and binary forms, with or without f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 6) * modification, are permitted provided that the following conditions f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 7) * are met: f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 8) * 1. Redistributions of source code must retain the above copyright f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 9) * notice, this list of conditions and the following disclaimer. f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 10) * 2. Redistributions in binary form must reproduce the above copyright f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 11) * notice, this list of conditions and the following disclaimer in the f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 12) * documentation and/or other materials provided with the distribution. 2f5f89963 (Anthony Liguori 2009-01-26 19:37:41 +0000 13) * 3. Neither the name of the University nor the names of its contributors f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 14) * may be used to endorse or promote products derived from this software f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 15) * without specific prior written permission. f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 16) * f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 17) * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 18) * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE f0cbd3ec9 (Fabrice Bellard 2004-04-22 00:10:48 +0000 19) * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ...... ...... ......