Displaying 1 result from an estimated 1 matches for "sshbuf_tell".
2024 Aug 13
1
[PATCH] harden parent-child check in sshbuf.c
...ex: sshbuf.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sshbuf.c,v
diff -u -p -u -p -r1.19 sshbuf.c
--- sshbuf.c 2 Dec 2022 04:40:27 -0000 1.19
+++ sshbuf.c 13 Aug 2024 16:52:58 -0000
@@ -55,6 +55,7 @@ sshbuf_check_sanity(const struct sshbuf
SSHBUF_TELL("sanity");
if (__predict_false(buf == NULL ||
(!buf->readonly && buf->d != buf->cd) ||
+ buf->parent == buf ||
buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX ||
buf->cd == NULL ||
buf->max_size > SSHBUF_SIZE_MAX...