Skip to content

Commit ff99dd0

Browse files
FreddieOliveiracyberknight777
authored andcommitted
netfilter: Fixed null pointer dereference
This file needs to be patched because of a bug introduced by Google. After you run any container, a seg fault will be generated due to a null pointer dereference and your phone will freeze and reboot. If you work at Google or know someone who does, warn him/her about it. Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
1 parent 1362c7e commit ff99dd0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

net/netfilter/xt_qtaguid.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -739,21 +739,15 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v)
739739
{
740740
struct proc_iface_stat_fmt_info *p = m->private;
741741
struct iface_stat *iface_entry;
742-
struct rtnl_link_stats64 dev_stats, *stats;
742+
struct rtnl_link_stats64 *stats;
743743
struct rtnl_link_stats64 no_dev_stats = {0};
744744

745745

746746
CT_DEBUG("qtaguid:proc iface_stat_fmt pid=%u tgid=%u uid=%u\n",
747747
current->pid, current->tgid, from_kuid(&init_user_ns, current_fsuid()));
748748

749749
iface_entry = list_entry(v, struct iface_stat, list);
750-
751-
if (iface_entry->active) {
752-
stats = dev_get_stats(iface_entry->net_dev,
753-
&dev_stats);
754-
} else {
755-
stats = &no_dev_stats;
756-
}
750+
stats = &no_dev_stats;
757751
/*
758752
* If the meaning of the data changes, then update the fmtX
759753
* string.

0 commit comments

Comments
 (0)