mISDN: Fix a use after free in hfcmulti_tx()
ANBZ: #11143 commit 9460ac3dd1ae033bc2b021a458fb535a0c36ddb2 stable. commit61ab751451
upstream. Don't dereference *sp after calling dev_kfree_skb(*sp). Fixes:af69fb3a8f
("Add mISDN HFC multiport driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/8be65f5a-c2dd-4ba0-8a10-bfe5980b8cfb@stanley.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Fixes: CVE-2024-42280 Signed-off-by: Xiao Long <xiaolong@openanolis.org> Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com> Reviewed-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/3958
This commit is contained in:
parent
754269838a
commit
b57ac0a9bc
|
@ -1931,7 +1931,7 @@ hfcmulti_dtmf(struct hfc_multi *hc)
|
|||
static void
|
||||
hfcmulti_tx(struct hfc_multi *hc, int ch)
|
||||
{
|
||||
int i, ii, temp, len = 0;
|
||||
int i, ii, temp, tmp_len, len = 0;
|
||||
int Zspace, z1, z2; /* must be int for calculation */
|
||||
int Fspace, f1, f2;
|
||||
u_char *d;
|
||||
|
@ -2152,14 +2152,15 @@ next_frame:
|
|||
HFC_wait_nodebug(hc);
|
||||
}
|
||||
|
||||
tmp_len = (*sp)->len;
|
||||
dev_kfree_skb(*sp);
|
||||
/* check for next frame */
|
||||
if (bch && get_next_bframe(bch)) {
|
||||
len = (*sp)->len;
|
||||
len = tmp_len;
|
||||
goto next_frame;
|
||||
}
|
||||
if (dch && get_next_dframe(dch)) {
|
||||
len = (*sp)->len;
|
||||
len = tmp_len;
|
||||
goto next_frame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue