Skip to content

Commit

Permalink
netfilter: Fixed null pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FreddieOliveira authored and cyberknight777 committed Jul 19, 2021
1 parent 1362c7e commit ff99dd0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions net/netfilter/xt_qtaguid.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,21 +739,15 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v)
{
struct proc_iface_stat_fmt_info *p = m->private;
struct iface_stat *iface_entry;
struct rtnl_link_stats64 dev_stats, *stats;
struct rtnl_link_stats64 *stats;
struct rtnl_link_stats64 no_dev_stats = {0};


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

iface_entry = list_entry(v, struct iface_stat, list);

if (iface_entry->active) {
stats = dev_get_stats(iface_entry->net_dev,
&dev_stats);
} else {
stats = &no_dev_stats;
}
stats = &no_dev_stats;
/*
* If the meaning of the data changes, then update the fmtX
* string.
Expand Down

0 comments on commit ff99dd0

Please sign in to comment.