Skip to content

Commit

Permalink
MT#55283 fix array out of bounds access
Browse files Browse the repository at this point in the history
The PT index can be -1 or -2. Ignore RTP stats in this case.

fixes #1814

Change-Id: Ifdcdbccad592fd1a27d2b31359861ecb3e725546
  • Loading branch information
rfuchs committed Apr 5, 2024
1 parent f695e77 commit 3876bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel-module/xt_RTPENGINE.c
Original file line number Diff line number Diff line change
Expand Up @@ -5310,7 +5310,7 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb,

skb_trim(skb, rtp.header_len + rtp.payload_len);

if (g->target.rtp_stats && ssrc_idx != -1)
if (g->target.rtp_stats && ssrc_idx != -1 && rtp_pt_idx >= 0)
rtp_stats(g, &rtp, ktime_to_us(skb->tstamp), rtp_pt_idx, ssrc_idx);

DBG("packet payload decrypted as %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x...\n",
Expand Down

0 comments on commit 3876bdd

Please sign in to comment.