From: Dawson Engler <engler@csl.Stanford.EDU>
To: linux-kernel@vger.kernel.org
Subject: [CHECKER] 2.4.5-ac4 use of freed pointers
Date: Thu, 31 May 2001 21:52:49 -0700 (PDT) [thread overview]
Message-ID: <200106010452.VAA17405@csl.Stanford.EDU> (raw)
Three use-after-free bugs:
---------------------------------------------------------
[BUG]
/u2/engler/mc/oses/linux/2.4.5-ac4/net/rose/rose_dev.c:127:rose_rebuild_header: ERROR:FREE:122:127: Use-after-free of 'skbn'! set by 'kfree_skb':122
skb_set_owner_w(skbn, skb->sk);
kfree_skb(skb);
if (!rose_route_frame(skbn, NULL)) {
Start --->
kfree_skb(skbn);
stats->tx_errors++;
}
stats->tx_packets++;
Error --->
stats->tx_bytes += skbn->len;
#endif
return 1;
}
---------------------------------------------------------
[BUG] frees then uses the next pointer.
/u2/engler/mc/oses/linux/2.4.5-ac4/drivers/net/wan/lapbether.c:101:lapbeth_check_devices: ERROR:FREE:113:101: Use-after-free of 'lapbeth'! set by 'kfree':113
save_flags(flags);
cli();
lapbeth_prev = NULL;
Error --->
for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth->next) {
if (!dev_get(lapbeth->ethname)) {
if (lapbeth_prev)
lapbeth_prev->next = lapbeth->next;
else
lapbeth_devices = lapbeth->next;
if (&lapbeth->axdev == dev)
result = 1;
unregister_netdev(&lapbeth->axdev);
dev_put(lapbeth->ethdev);
Start --->
kfree(lapbeth);
}
else
lapbeth_prev = lapbeth;
---------------------------------------------------------
[BUG] frees then uses the next pointer.
/u2/engler/mc/oses/linux/2.4.5-ac4/drivers/net/hamradio/bpqether.c:178:bpq_check_devices: ERROR:FREE:193:178: Use-after-free of 'bpq'! set by 'kfree':193
save_flags(flags);
cli();
bpq_prev = NULL;
Error --->
for (bpq = bpq_devices; bpq != NULL; bpq = bpq->next) {
... DELETED 9 lines ...
/* We should be locked, call
* unregister_netdevice directly
*/
unregister_netdevice(&bpq->axdev);
Start --->
kfree(bpq);
}
else
bpq_prev = bpq;
next reply other threads:[~2001-06-01 4:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-01 4:52 Dawson Engler [this message]
2001-06-01 7:48 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200106010452.VAA17405@csl.Stanford.EDU \
--to=engler@csl.stanford.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®