mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-10-10 04:03:11 +08:00
fix: quic sniffer out-of-bounds read causes process crash via single UDP packet
This commit is contained in:
@@ -236,6 +236,10 @@ func (q *quicPacketSender) readQuicData(b []byte) error {
|
||||
cache := buf.NewPacket()
|
||||
defer cache.Release()
|
||||
|
||||
if hdrLen+4+16 > len(b) {
|
||||
return errNotQuic
|
||||
}
|
||||
|
||||
mask := cache.Extend(block.BlockSize())
|
||||
block.Encrypt(mask, b[hdrLen+4:hdrLen+4+16])
|
||||
firstByte := b[0]
|
||||
|
||||
Reference in New Issue
Block a user