| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Accounted for added command and added fields in gtp_policy and
gtp_genl_policy. Users can create GTP devices without providing
IFLA_GTP_FD0 and IFLA_GTP_FD1 arguments, if IFLA_GTP_CREATE_SOCKETS
field is set.
|
| |
|
|
|
|
|
|
|
| |
Make the following changes for extraction to succeed:
- drop the KVM API constants for features removed in 6.9;
- hardcode the three TUNNEL_*_OPT constants that cannot be extracted due to a header change;
- hardcode the HCI_OP_* constants removed in 99fca36c8b412 ("Bluetooth: HCI: Remove HCI_AMP support");
- hardcode the L2CAP_* constants removed in e7b02296fb40 ("Bluetooth: Remove BT_HS");
- hardcode LANDLOCK_ACCESS_FS_IOCTL_DEV until it hits upstream.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All flags that are subset of other flags were identified with the
following Bash script [1]. Only a small set of flags identified by the
script were rewritten to use nested flag definitions, after manually
checking if it makes sense (based on syzkaller context and man pages).
For example, msgget_flags was rewritten as follows:
-msgget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+msgget_flags = IPC_CREAT, IPC_EXCL, open_mode
According to the msgget(2) man page:
Upon creation, the least significant bits of the argument msgflg
define the permissions of the message queue. These permission bits
have the same format and semantics as the permissions specified for
the mode argument of open(2).
So it is correct to use open_mode directly in the definition of the
flags for msgget(2).
1 -
#!/bin/bash
regexp_flags="^(\w+)\s*=\s+([a-zA-Z\"][^=]*)$"
is_subset() {
local -n subset=$1
local -n superset=$2
for element in "${subset[@]}"; do
if [[ ! " ${superset[@]} " =~ " $element " ]]; then
return 1
fi
done
return 0
}
declare -A parsed_lines
while IFS= read -r line; do
if [[ ! "$line" =~ $regexp_flags ]]; then
continue
fi
list_name="${BASH_REMATCH[1]}"
values="${BASH_REMATCH[2]}"
IFS=',' read -r -a values_array <<< "$(echo "$values" | sed 's/ //g' | tr ',' '\n' | sort | tr '\n' ',')"
# Skip flags with too few value.
if [ "${#values_array[@]}" -lt 3 ]; then
continue
fi
# Skip the syz0, syz1, etc. lists.
if [ "${values_array[0]}" = "\"syz0\"" ]; then
continue
fi
parsed_lines["${list_name}"]="${values_array[@]}"
done
for list_name in "${!parsed_lines[@]}"; do
values_array=(${parsed_lines["$list_name"]})
for other_list_name in "${!parsed_lines[@]}"; do
other_values_array=(${parsed_lines["$other_list_name"]})
if [ "$list_name" = "$other_list_name" ]; then
continue
fi
if is_subset values_array other_values_array; then
if [ "${#values_array[@]}" -eq "${#other_values_array[@]}" ]; then
echo "$list_name EQUALS $other_list_name"
else
echo "$list_name is a SUBET of $other_list_name"
fi
fi
done
done
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
XFRM device creation will fail w/o IFLA_XFRM_IF_ID attribute:
https://elixir.bootlin.com/linux/v6.0-rc4/source/net/xfrm/xfrm_interface.c#L648
Add this attribute.
This ID is also present in descriptions in at least 2 places.
In one we got it wrong, it's not ifindex (easy to confuse because of the name).
Fix it as well.
|
| |
|
|
| |
Update #590
|
| | |
|
| |
|
|
|
|
|
| |
The new neighbour flag NTF_STICKY was added upstream in commit
v4.20-rc1~14^2~392.
Signed-off-by: Paul Chaignon <paul@isovalent.com>
|
| |
|
|
|
|
|
|
| |
The NDA_FLAGS_EXT netlink attribute was added upstream in commit
v5.16-rc1~159^2~222^2~1, to allow for new neighbor flags. The only such
flag currently supported is NTF_EXT_MANAGED.
Signed-off-by: Paul Chaignon <paul@isovalent.com>
|
| |
|
|
| |
See: https://elixir.bootlin.com/linux/v5.15-rc6/source/include/uapi/linux/batman_adv.h#L692
|
| |
|
|
|
|
|
| |
Update dev_vhci consts as they were updated to use inclusive language in
commit 3d4f9c00492b and 6397729bb74d.
Remove caif_hsi consts as they were removed in commit ca75bcf0a83b.
Remove raw driver ioctls as they were removed in commit 603e4922f1c8.
|
| |
|
|
|
| |
Uncommented because the kernel fixed the seg6_iptunnel.h uapi header
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=88fab21c691bb1ff164e540735237a385e3afeaf
|
| | |
|
| |
|
|
| |
https://elixir.bootlin.com/linux/v5.8-rc4/source/net/ipv4/nexthop.c#L1961
|
| |
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/seg6_local.h#L21
https://elixir.bootlin.com/linux/latest/source/net/ipv6/seg6_local.c#L649
|
| |
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L102
https://elixir.bootlin.com/linux/latest/source/net/core/lwt_bpf.c#L364
|
| |
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/seg6_iptunnel.h#L22
TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_tunnel_core.c#L713
|
| |
|
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/ipv6/ila/ila_lwt.c#L121
The comment is about their statement in the kernel file:
https://elixir.bootlin.com/linux/latest/source/net/ipv6/ila/ila_lwt.c#L196
|
| |
|
|
|
|
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L102
https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_tunnel_core.c#L219
The policies added have a suffix (_lwt), because they already exist in syzkaller
with the kernel name. An example of a union with the same name described in
sys/linux/socket_netlink_route_sched.txt:
https://elixir.bootlin.com/linux/latest/source/net/sched/cls_flower.c#L709
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/mpls/mpls_iptunnel.c#L25
|
| |
|
|
|
| |
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/rpl.h#L19
update google#533
|
| |
|
|
|
|
|
| |
Added a new encap type, from the lwtunnel_encap_types struct, defined in the
include/uapi/linux/lwtunnel.h file.
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L16
Update #533.
|
| | |
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/bridge/br_mdb.c#L837
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/bridge/br_vlan.c#L2045
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/ipv6/addrlabel.c#L625
|
| |
|
|
| |
https://elixir.bootlin.com/linux/latest/source/net/core/rtnetlink.c#L5565
|
| | |
|
| |
|
|
|
|
|
|
| |
flags[foo, int8]
foo = 0x12345678
is always an error, detect these cases.
Found some bugs in mptcp, packet sockets, kvm.
|
| |
|
|
| |
Update #806
|
| |
|
|
| |
Update #590
|
| |
|
|
| |
Update #590
|
| |
|
|
|
|
|
|
|
|
|
| |
As far as I understand most subsystems don't care about
the nest flag, but some do. But marking them as nest
won't harm (?). Let's mark all of them.
Caught several cases where should have been used array[policy]
but used just policy.
Update #590
|
| |
|
|
|
|
|
|
|
|
| |
1. Match policies that has a _suffix in our descriptions
(we frequently do this to improve precision or avoid dup names).
2. Rename policies in descriptions to match kernel names.
3. Match policy if there are several such names in kernel.
4. Recognize policies with helper sub-policies.
Update #590
|
| |
|
|
| |
Update #590
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
1. Turns out that NLA_F_NESTED is actually used and checked
(nla_parse_nested checks it, while nla_parse_nested_deprecated does not).
Similarly, ipset extensively checks NLA_F_NET_BYTEORDER.
So we need these bits.
2. nla_len must not account for the trailing alighnment padding.
This means we set wrong len for payloads that are not multiple of 4
(int8/int16/strings/arrays/some structs/etc).
|
| | |
|
| |
|
|
| |
+ some netlink descriptions
|
| |
|
|
| |
Update #590
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel get mpls lable like
```
unsigned entry = be32_to_cpu(hdr->label_stack_entry);
result.label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT;
```
So we just need to store the label in big endian order.
For mpls rta types, kernel accpet only one lable for RTA_DST and
multi labels for RTA_NEWDST.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Add interface specified policies for IFLA_LINKINFO. I only added the
interfaces we create in initial setup. Remain other types of interfaces
in the TODO list.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|