From fdfa5ea3524dd5efcd0c9ac1af7ed343af78c316 Mon Sep 17 00:00:00 2001 From: Palapeli <26661008+mkwcat@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:52:14 -0400 Subject: [PATCH] NAS: Fix out of bounds slice in TLS read --- nas/tls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nas/tls.go b/nas/tls.go index 4df7338..bc6f8e5 100644 --- a/nas/tls.go +++ b/nas/tls.go @@ -424,7 +424,7 @@ func (c *consoleTLSConn) Read(b []byte) (n int, err error) { return 0, errors.New("non-application data received") } // Write the decrypted content to the buffer - if int(recordLength-5-16) > len(b) { + if int(recordLength-16) > len(b) { c.decodedBuffer.Write(buf[5+len(b) : 5+recordLength-16]) } c.encodedBuffer.Next(5 + int(recordLength))