Linux Kernel Int Overflow Leading To Priv Esc
An integer overflow in the Linux kernel's netfilter nft_validate_register_store function allows a local attacker with low-privileged code execution to write out of bounds on the kernel stack. This can be used to bypass KASLR and overwrite a return address, leading to privilege escalation to root.
ssd-disclosure.com
Published on ssd-disclosure.com
A vulnerability in the Linux kernel allows local attackers to escalate privileges on affected installations of Linux Kernel. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a local privilege escalation in the Linux kernel's netfilter subsystem, specifically in the nf_tables code that parses and validates register numbers when an expression is initialised. The flaw is an integer overflow in nft_validate_register_store, reached through nft_parse_register_store, which lets a low-privileged local user select a register far outside the 16 data registers the state machine is supposed to expose. The result is out-of-bounds read and write on the kernel stack.
The report notes that the vulnerability was present only in Debian 11 (Linux Kernel 5.10), because the upstream patch was not backported to that kernel. Debian released an updated kernel in July 2023, and the vulnerability was patched only in July 2023.
An attacker must first be able to execute low-privileged code on the target system. From there the flaw allows escalation to root and execution of arbitrary code in the context of root.
Setup
The affected version is Debian 11 running Linux Kernel 5.10.
The credit goes to an independent security researcher working with SSD Secure Disclosure. No CVE, CVSS score or bounty is given in the report.
Finding it
The starting point is nft_parse_register in /net/netfilter/nf_tables_api.c. This function is used by expression initialisation code to decide which register of the state machine an expression should use.
unsigned int nft_parse_register(const struct nlattr *attr)
{
unsigned int reg;
reg = ntohl(nla_get_be32(attr));
switch (reg) {
case NFT_REG_VERDICT...NFT_REG_4:
return reg * NFT_REG_SIZE / NFT_REG32_SIZE;
default:
return reg + NFT_REG_SIZE / NFT_REG32_SIZE - NFT_REG32_00; // 1
}
}
EXPORT_SYMBOL_GPL(nft_parse_register);
The reg value comes straight from an attacker-controlled netlink attribute. Taking the default branch at // 1 means the return value of the function is also attacker-controlled.
When an expression that modifies a register is initialised, nft_parse_register_store loads the register number at // 2 and validates it at // 3:
int nft_parse_register_store(const struct nft_ctx *ctx,
const struct nlattr *attr, u8 *dreg,
const struct nft_data *data,
enum nft_data_types type, unsigned int len)
{
int err;
u32 reg;
reg = nft_parse_register(attr); // 2
err = nft_validate_register_store(ctx, reg, data, type, len); // 3
if (err < 0)
return err;
*dreg = reg;
return 0;
}
EXPORT_SYMBOL_GPL(nft_parse_register_store);
The validation itself is in nft_validate_register_store. It first checks that the selected register does not influence the execution flow of the state machine at // 4, then checks that the register is contained within the 16 data registers at // 5:
static int nft_validate_register_store(const struct nft_ctx *ctx,
enum nft_registers reg,
const struct nft_data *data,
enum nft_data_types type,
unsigned int len)
{
int err;
switch (reg) {
case NFT_REG_VERDICT: // 4
if (type != NFT_DATA_VERDICT)
return -EINVAL;
if (data != NULL &&
(data->verdict.code == NFT_GOTO ||
data->verdict.code == NFT_JUMP)) {
err = nf_tables_check_loops(ctx, data->verdict.chain);
if (err < 0)
return err;
}
return 0;
default:
if (reg < NFT_REG_1 * NFT_REG_SIZE / NFT_REG32_SIZE)
return -EINVAL;
if (len == 0)
return -EINVAL;
if (reg * NFT_REG32_SIZE + len > // 5
sizeof_field(struct nft_regs, data))
return -ERANGE;
if (data != NULL && type != NFT_DATA_VALUE)
return -EINVAL;
return 0;
}
}
The bounds check at // 5 multiplies reg by NFT_REG32_SIZE and adds len. If reg is close to UINT_MAX, that multiplication overflows. The report works the example with reg set to FFFFFFF0: multiplying by NFT_REG32_SIZE (value 4) yields 3FFFFFFC0, which is truncated to FFFFFFC0. Choosing a length such as 50h makes the check wrap around again and produce a final value of 10h, which passes. The selected register in that case is the 192nd register, so memory can be read and written out of bounds.
Exploitation
The report points to nft_payload in /net/netfilter/nft_payload.c as a useful place to apply the bug. During initialisation the expression computes the register where data from the incoming packet will be stored:
static int nft_payload_init(const struct nft_ctx *ctx,
const struct nft_expr *expr,
const struct nlattr * const tb[])
{
struct nft_payload *priv = nft_expr_priv(expr);
priv->base = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_BASE]));
priv->offset = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_OFFSET]));
priv->len = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_LEN]));
return nft_parse_register_store(ctx, tb[NFTA_PAYLOAD_DREG], // 6
&priv->dreg, NULL, NFT_DATA_VALUE,
priv->len);
}
Because the overflow lets an out-of-range register pass validation, the expression can be made to write user-controlled packet data onto the kernel stack.
The evaluation path is where the write happens:
void nft_payload_eval(const struct nft_expr *expr,
struct nft_regs *regs,
const struct nft_pktinfo *pkt)
{
const struct nft_payload *priv = nft_expr_priv(expr);
const struct sk_buff *skb = pkt->skb;
u32 *dest = ®s->data[priv->dreg];
int offset;
if (priv->len % NFT_REG32_SIZE)
dest[priv->len / NFT_REG32_SIZE] = 0;
switch (priv->base) {
case NFT_PAYLOAD_LL_HEADER:
if (!skb_mac_header_was_set(skb))
goto err;
if (skb_vlan_tag_present(skb)) {
if (!nft_payload_copy_vlan(dest, skb,
priv->offset, priv->len))
goto err;
return;
}
offset = skb_mac_header(skb) - skb->data;
break;
case NFT_PAYLOAD_NETWORK_HEADER:
offset = skb_network_offset(skb);
break;
case NFT_PAYLOAD_TRANSPORT_HEADER:
if (!pkt->tprot_set)
goto err;
offset = pkt->xt.thoff;
break;
default:
BUG();
}
offset += priv->offset;
if (skb_copy_bits(skb, offset, dest, priv->len) < 0) // 7
goto err;
return;
err:
regs->verdict.code = NFT_BREAK;
}
Step 1: leak the stack to bypass KASLR
The exploit uses the nft_payload expression to leak information from the stack in order to bypass KASLR.
Step 2: write to the stack
The same expression is used to write data onto the stack in order to gain code execution.
Step 3: hijack the return address
By leveraging TCP packets to trigger the vulnerability, the exploit overwrites the return address of tcp_transmit_skb and redirects execution to a ROP chain that overwrites modprobe.
Step 4: get a root shell
The exploit provided starts a shell with root privileges.
Root cause
The mistake is the bounds check in nft_validate_register_store. The expression reg * NFT_REG32_SIZE + len wraps for a reg near UINT_MAX, as the report's FFFFFFF0 example shows. and the comparison against sizeof_field(struct nft_regs, data) succeeds for a register that is far outside the array.
Impact
A local attacker who can already execute low-privileged code on an affected Debian 11 system can escalate to root and execute arbitrary code in the context of root. The report states the flaw was present only in Debian 11 due to the missing backport, and that it was patched only in July 2023.
Fix
Debian released an updated kernel in July 2023. The vendor response links to the accepted source upload into oldstable-security:
https://tracker.debian.org/news/1449040/accepted-linux-510179-3-source-into-oldstable-security
Variants to test
- Other expressions that call
nft_parse_register_storewith an attacker-controlled destination register and length, such as those usingNFTA_*_DREGandNFTA_*_LENattributes. A positive result is a register value nearUINT_MAXthat passes validation and produces an out-of-bounds access during evaluation. - Kernels that received the upstream fix but not the backport, or distributions that lag behind on
nf_tablespatches. A positive result is the same overflow behaviour on a kernel version the report does not cover. - Different
lenvalues combined with a highregto find other wrap-around combinations that satisfy the check. A positive result is any pair wherereg * NFT_REG32_SIZE + lenwraps to a small value while the real index is out of bounds. - Expressions that read from a register rather than write to it, to see whether the same parsing path exposes an out-of-bounds read. A positive result is leaked kernel memory returned through the expression's output.
What happened, in plain words
A security researcher found a bug in the part of the Linux operating system that handles network filtering. Linux is the core software that sits underneath many computers and servers, and it is split into two worlds: the kernel, which is the all-powerful core that talks directly to the hardware, and user space, where ordinary programs run with limited powers. The bug let an ordinary user, someone who can already run a program on the machine but has no special rights, quietly become the root user, the administrator account that can do anything on the system.
The bug lived in a feature called netfilter, and more specifically in a sub-feature called nf_tables. Netfilter is the firewall machinery inside Linux: it inspects network packets (the small chunks of data travelling over a network) and decides what to do with them, such as accept, drop or modify them. nf_tables is the modern way to describe those rules, and it is what the nft command-line tool talks to.
The report says the flaw was present only in Debian 11, a particular version of the Debian Linux distribution, running Linux Kernel 5.10. A distribution (or "distro") is a packaged bundle of the Linux kernel plus lots of software. The fix was never copied back ("backported") into the older 5.10 kernel that Debian 11 shipped. Debian finally released an updated kernel in July 2023, and the report says the vulnerability was patched only in July 2023.
The credit goes to an independent security researcher working with SSD Secure Disclosure. The report gives no CVE identifier, no CVSS score and no bounty amount.
The ideas you need first
Before the code makes sense, here are the concepts it leans on, explained from zero.
- Kernel and user space. Think of a bank. Customers (user space programs) can fill in forms and ask for things, but they never walk into the vault. Bank staff (the kernel) go into the vault on their behalf. If a customer finds a way to trick a teller into handing over vault keys, that is a privilege escalation.
- Privilege escalation. Gaining more rights than you were given. A local privilege escalation means you already have a foothold on the machine (you can run some code) and you use a bug to climb from a normal user to root. It is not about breaking in from the internet; it is about climbing upwards once inside.
- Registers (in this context). In nf_tables, a rule is made of small building blocks called expressions. Each expression can read values from, or write values to, a small set of numbered scratch slots called registers. Picture a row of 16 numbered pigeonholes on a desk. A rule picks up a value from one pigeonhole, does something with it, and puts a result into another. The kernel keeps these pigeonholes in a structure called
struct nft_regs, and the actual data lives in an array nameddata. - Integer overflow. Computers store numbers in fixed-size boxes. A 32-bit unsigned integer (
unsigned int, oru32) can hold values from 0 up to about 4.29 billion (UINT_MAX). If you multiply two numbers and the true answer is bigger than the box, the extra digits fall off the top and you get a small, wrong number. It is like an old car odometer that rolls from 999999 back to 000000: the real distance keeps growing, but the display wraps around. Security bugs love this because a check can be fooled into thinking a huge number is small. - Out-of-bounds read and write. If the kernel uses a number as an index into an array without checking it properly, it can end up reading or writing memory that sits next to the array. That neighbouring memory belongs to something else, and corrupting it can change how the kernel behaves.
- The kernel stack. Every running piece of kernel code has a small area of memory called its stack, used to hold local variables and, crucially, return addresses: the note saying "when this function finishes, go back to here". If an attacker can write onto the stack, they can overwrite a return address and redirect the kernel to code of their choosing.
- KASLR. Kernel Address Space Layout Randomisation. Each time the machine boots, the kernel is placed at a random address in memory, so an attacker cannot hard-code the location of the functions they want to jump to. To defeat it, an attacker first needs to leak an address from memory, then calculate where everything else is relative to it.
- ROP chain. Return-Oriented Programming. Instead of injecting a whole program, the attacker stitches together small existing snippets of kernel code ("gadgets"), each ending in a return instruction, so that control flows from one snippet to the next. It is like redirecting a train by flipping a series of switches rather than laying new track.
- modprobe. A program the kernel runs to load extra driver modules. If an attacker can overwrite the path the kernel uses to find
modprobe, the kernel will later run the attacker's program as root. This is a classic way to turn a kernel memory corruption into a root shell. - Netlink. The messaging system user space uses to talk to the kernel's networking code. nf_tables rules are created by sending structured netlink messages. The exploit builds these messages with two C libraries:
libnftnl(which knows the nf_tables message format) andlibmnl(which handles the low-level netlink socket). - Netlink attribute. A named, typed field inside a netlink message. For example,
NFTA_PAYLOAD_DREGis the attribute that says which register the payload expression should write to, andNFTA_PAYLOAD_LENsays how many bytes to copy.
Setup
The affected version is Debian 11 with Linux Kernel 5.10. The exploit is written in C, a low-level programming language, and uses libnftnl and libmnl to build and send netlink messages to the NETLINK_NETFILTER socket. A socket here is just an endpoint for sending messages to the kernel.
You do not need to understand every helper to follow the bug; they are plumbing for building firewall rules from C.
Finding it
The starting point is a function called nft_parse_register in the file /net/netfilter/nf_tables_api.c. When a rule is being set up, this function decides which register number an expression should use.
unsigned int nft_parse_register(const struct nlattr *attr)
{
unsigned int reg;
reg = ntohl(nla_get_be32(attr));
switch (reg) {
case NFT_REG_VERDICT...NFT_REG_4:
return reg * NFT_REG_SIZE / NFT_REG32_SIZE;
default:
return reg + NFT_REG_SIZE / NFT_REG32_SIZE - NFT_REG32_00; // 1
}
}
EXPORT_SYMBOL_GPL(nft_parse_register);
Line by line:
unsigned int nft_parse_register(const struct nlattr *attr)declares the function. It takes a pointer to a netlink attribute (attr) and returns an unsigned integer, the register number.unsigned int reg;creates a local variable to hold the raw number.reg = ntohl(nla_get_be32(attr));reads a 32-bit value out of the attribute and converts it from network byte order to the machine's byte order. Byte order is just the convention for which end of a multi-byte number comes first;ntohlmeans "network to host, long". The important point: this value comes straight from the message the attacker sent, so the attacker controls it completely.- The
switchchecks whether the value is one of the small, known register numbers (NFT_REG_VERDICTthroughNFT_REG_4). If so, it scales the number and returns it. - The
default:branch at// 1handles every other value. It adds a constant offset and returns the result. Because the attacker controlsreg, they also control what this branch returns.
So the first lesson: the register number is not chosen by the kernel, it is chosen by whoever sends the netlink message.
Next, when an expression that modifies a register is initialised, nft_parse_register_store loads the register number at // 2 and validates it at // 3:
int nft_parse_register_store(const struct nft_ctx *ctx,
const struct nlattr *attr, u8 *dreg,
const struct nft_data *data,
enum nft_data_types type, unsigned int len)
{
int err;
u32 reg;
reg = nft_parse_register(attr); // 2
err = nft_validate_register_store(ctx, reg, data, type, len); // 3
if (err < 0)
return err;
*dreg = reg;
return 0;
}
EXPORT_SYMBOL_GPL(nft_parse_register_store);
Line by line:
- The function takes a context, the attribute holding the register number, a pointer
dregwhere the final destination register will be stored, some optional data, a data type and a length. reg = nft_parse_register(attr);at// 2calls the function above, soregis the attacker-influenced number.err = nft_validate_register_store(ctx, reg, data, type, len);at// 3asks the validation function whether this register is acceptable.- If validation fails (
err < 0), the function returns the error and nothing is stored. *dreg = reg;stores the register number into au8, an 8-bit unsigned integer that can only hold 0 to 255. This detail matters later: a huge 32-bit number gets chopped down to its lowest 8 bits.
The validation itself lives in nft_validate_register_store. It first checks at // 4 that the selected register does not influence the execution flow of the state machine (the verdict register decides whether a packet is accepted, dropped or jumped to another chain), then checks at // 5 that the register is inside the 16 data registers:
static int nft_validate_register_store(const struct nft_ctx *ctx,
enum nft_registers reg,
const struct nft_data *data,
enum nft_data_types type,
unsigned int len)
{
int err;
switch (reg) {
case NFT_REG_VERDICT: // 4
if (type != NFT_DATA_VERDICT)
return -EINVAL;
if (data != NULL &&
(data->verdict.code == NFT_GOTO ||
data->verdict.code == NFT_JUMP)) {
err = nf_tables_check_loops(ctx, data->verdict.chain);
if (err < 0)
return err;
}
return 0;
default:
if (reg < NFT_REG_1 * NFT_REG_SIZE / NFT_REG32_SIZE)
return -EINVAL;
if (len == 0)
return -EINVAL;
if (reg * NFT_REG32_SIZE + len > // 5
sizeof_field(struct nft_regs, data))
return -ERANGE;
if (data != NULL && type != NFT_DATA_VALUE)
return -EINVAL;
return 0;
}
}
Line by line:
- The
case NFT_REG_VERDICT:at// 4is the special register that controls what happens to the packet. If the expression is trying to write a verdict, the code checks the type and, for jumps and gotos, checks for loops in the chain of rules. This branch is not where the bug is. - The
default:branch handles ordinary data registers. First it rejects registers below a minimum (NFT_REG_1 * NFT_REG_SIZE / NFT_REG32_SIZE), so you cannot write into the reserved low registers. if (len == 0) return -EINVAL;rejects a zero length.- The critical check at
// 5:reg * NFT_REG32_SIZE + len > sizeof_field(struct nft_regs, data). In words: "multiply the register number by the size of one register, add the length, and if that is bigger than the data array, reject it." This is meant to stop writes past the end of the array. - The remaining checks make sure the data type is a plain value when data is supplied.
The problem is that the multiplication and addition at // 5 are done in ordinary 32-bit unsigned arithmetic. If reg is close to UINT_MAX, the product wraps around, exactly like the odometer. The report works a concrete example: set reg to FFFFFFF0. Multiplying by NFT_REG32_SIZE, which has the value 4, gives 3FFFFFFC0. That is too big for 32 bits, so it is truncated to FFFFFFC0. Then choosing a length such as 50h makes the addition wrap around again and produce a final value of 10h. Since 10h is small, the check passes. But the register the attacker actually selected is the 192nd register, far outside the 16 that exist, so memory can be read and written out of bounds.
Exploitation
The report points to the nft_payload expression in /net/netfilter/nft_payload.c as a good place to apply the bug. A payload expression copies bytes from the incoming network packet into a register. During initialisation it works out which register will receive the data:
static int nft_payload_init(const struct nft_ctx *ctx,
const struct nft_expr *expr,
const struct nlattr * const tb[])
{
struct nft_payload *priv = nft_expr_priv(expr);
priv->base = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_BASE]));
priv->offset = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_OFFSET]));
priv->len = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_LEN]));
return nft_parse_register_store(ctx, tb[NFTA_PAYLOAD_DREG], // 6
&priv->dreg, NULL, NFT_DATA_VALUE,
priv->len);
}
Line by line:
nft_expr_priv(expr)fetches the expression's private data structure, where its settings are stored.priv->baserecords where in the packet to start reading: the link-layer header, the network header or the transport header. Think of a parcel: the outer box, the address label, or the letter inside.priv->offsetrecords how far into that section to start.priv->lenrecords how many bytes to copy.- The
returncallsnft_parse_register_storeat// 6, passing the destination register attributeNFTA_PAYLOAD_DREGand the lengthpriv->len. This is the call that runs the buggy validation. Because the overflow lets an out-of-range register pass, the expression can be made to write attacker-controlled packet data onto the kernel stack.
The actual write happens later, when a packet is evaluated against the rule:
void nft_payload_eval(const struct nft_expr *expr,
struct nft_regs *regs,
const struct nft_pktinfo *pkt)
{
const struct nft_payload *priv = nft_expr_priv(expr);
const struct sk_buff *skb = pkt->skb;
u32 *dest = ®s->data[priv->dreg];
int offset;
if (priv->len % NFT_REG32_SIZE)
dest[priv->len / NFT_REG32_SIZE] = 0;
switch (priv->base) {
case NFT_PAYLOAD_LL_HEADER:
if (!skb_mac_header_was_set(skb))
goto err;
if (skb_vlan_tag_present(skb)) {
if (!nft_payload_copy_vlan(dest, skb,
priv->offset, priv->len))
goto err;
return;
}
offset = skb_mac_header(skb) - skb->data;
break;
case NFT_PAYLOAD_NETWORK_HEADER:
offset = skb_network_offset(skb);
break;
case NFT_PAYLOAD_TRANSPORT_HEADER:
if (!pkt->tprot_set)
goto err;
offset = pkt->xt.thoff;
break;
default:
BUG();
}
offset += priv->offset;
if (skb_copy_bits(skb, offset, dest, priv->len) < 0) // 7
goto err;
return;
err:
regs->verdict.code = NFT_BREAK;
}
Line by line:
const struct sk_buff *skb = pkt->skb;gets the packet buffer, the in-memory representation of the network packet.u32 *dest = ®s->data[priv->dreg];computes the destination pointer by indexing into the register array withpriv->dreg. Becausepriv->dregwas set from the overflowing register number, this pointer can point outside the array.- The
if (priv->len % NFT_REG32_SIZE)block zeroes the last partial word if the length is not a multiple of four bytes, so the tail of the register is clean. - The
switchworks out the starting offset inside the packet depending onpriv->base. The VLAN case handles tagged packets specially; the other cases compute an offset from the packet headers. offset += priv->offset;adds the user-chosen offset.skb_copy_bits(skb, offset, dest, priv->len)at// 7copiespriv->lenbytes from the packet intodest. This is the out-of-bounds write onto the kernel stack.- If anything goes wrong, the
err:label sets the verdict toNFT_BREAK, which stops evaluating the rule.
Step 1: leak the stack to bypass KASLR
The exploit uses the nft_payload expression to leak information from the stack. Why? Because KASLR randomises where the kernel sits in memory, so the attacker needs to read a real kernel address before they can calculate where their target functions are.
Step 2: write to the stack
With the layout known, the same expression is used to write data onto the stack in order to gain code execution. The attacker controls the bytes because they come from the network packet.
Step 3: hijack the return address
By leveraging TCP packets to trigger the vulnerability, the exploit overwrites the return address of tcp_transmit_skb and redirects execution to a ROP chain that overwrites modprobe. In plain terms: when the kernel function that sends TCP packets finishes, it is supposed to return to its caller. Instead it returns into the attacker's chain of code snippets, which changes the modprobe path so that the next time the kernel tries to load a module, it runs the attacker's program as root.
Step 4: get a root shell
The exploit provided starts a shell with root privileges.
Root cause
The mistake is the bounds check in nft_validate_register_store. The expression reg * NFT_REG32_SIZE + len wraps for a reg near UINT_MAX, as the report's FFFFFFF0 example shows. and the comparison against sizeof_field(struct nft_regs, data) succeeds for a register that is far outside the array.
Impact
A local attacker who can already execute low-privileged code on an affected Debian 11 system can escalate to root and execute arbitrary code in the context of root. The report states the flaw was present only in Debian 11 due to the missing backport, and that it was patched only in July 2023.
Fix
Debian released an updated kernel in July 2023. The vendor response links to the accepted source upload into oldstable-security:
https://tracker.debian.org/news/1449040/accepted-linux-510179-3-source-into-oldstable-security
"oldstable-security" is the Debian archive area that holds security updates for the previous stable release.
Variants to test
These are ideas for further research, written as things to try and what a positive result would look like.
- Other expressions that call
nft_parse_register_storewith an attacker-controlled destination register and length, such as those usingNFTA_*_DREGandNFTA_*_LENattributes. A positive result is a register value nearUINT_MAXthat passes validation and produces an out-of-bounds access during evaluation. - Kernels that received the upstream fix but not the backport, or distributions that lag behind on
nf_tablespatches. A positive result is the same overflow behaviour on a kernel version the report does not cover. - Different
lenvalues combined with a highregto find other wrap-around combinations that satisfy the check. A positive result is any pair wherereg * NFT_REG32_SIZE + lenwraps to a small value while the real index is out of bounds. - Expressions that read from a register rather than write to it, to see whether the same parsing path exposes an out-of-bounds read. A positive result is leaked kernel memory returned through the expression's output.
Glossary
- Kernel: the core of the operating system that runs with full privileges and talks directly to hardware.
- User space: the part of the system where ordinary programs run with limited privileges.
- Root: the administrator account on Linux, which can do anything on the system.
- Privilege escalation: using a bug to gain more rights than you were given, for example from a normal user to root.
- Local privilege escalation: privilege escalation where the attacker already has some ability to run code on the machine.
- netfilter: the Linux kernel's framework for inspecting and manipulating network packets, used to build firewalls.
- nf_tables: the modern subsystem inside netfilter for defining tables, chains and rules, controlled by the
nfttool. - Expression: a small building block inside an nf_tables rule, such as payload, cmp or immediate, that reads or writes registers.
- Register: a numbered scratch slot that expressions read from or write to; nf_tables keeps 16 data registers plus a special verdict register.
- Verdict: the decision about what happens to a packet, such as accept, drop, jump or goto.
- Integer overflow: when a calculation produces a number too large for its fixed-size storage, so the value wraps around to a small, wrong number.
unsigned int/u32: a 32-bit unsigned integer, holding values from 0 to about 4.29 billion.u8: an 8-bit unsigned integer, holding values from 0 to 255.UINT_MAX: the largest value a 32-bit unsigned integer can hold.- Out-of-bounds read/write: accessing memory outside the intended array, which can leak data or corrupt neighbouring memory.
- Kernel stack: a small area of memory used by running kernel code to hold local variables and return addresses.
- Return address: the stored note telling a function where to go back to when it finishes.
- KASLR: Kernel Address Space Layout Randomisation, which places the kernel at a random address each boot to make exploitation harder.
- ROP chain: Return-Oriented Programming, a technique that chains together small existing code snippets to run attacker-chosen logic.
- modprobe: a program the kernel runs to load driver modules; overwriting its path is a common route to running code as root.
- Netlink: the messaging system user space uses to talk to the kernel's networking code.
- Netlink attribute: a named, typed field inside a netlink message, such as
NFTA_PAYLOAD_DREG. - Socket: an endpoint for sending and receiving messages, here between user space and the kernel.
libnftnl: a C library that builds nf_tables netlink messages.libmnl: a C library that handles low-level netlink sockets.- Byte order: the convention for which end of a multi-byte number comes first;
ntohlconverts from network order to host order. - Backport: copying a fix from a newer version of software back into an older version that is still in use.
- Distribution (distro): a packaged bundle of the Linux kernel plus software, such as Debian.
- Debian 11: a specific release of the Debian distribution, which shipped Linux Kernel 5.10.
- CVE: a public identifier for a known security vulnerability; the report gives none.
- CVSS: a scoring system for the severity of a vulnerability; the report gives no score.
- Proof of concept (PoC): code that demonstrates a vulnerability works.
- oldstable-security: the Debian archive area holding security updates for the previous stable release.