Skip to contentSkip to conversation

BPF ISA Security Considerations section

DISCUSSION [email protected] 4 participants 15 messages Apr 20, 2024 – Apr 23, 2024 BPF

lore
Share & tools
lore
#0 lore raw

Per https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before
it can become an RFC.

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other
documents like the "verifier expectations and building blocks for allowing safe
execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Proposed text:

Quoted 3 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with

memory,

Quoted 1 line

CPU, networking, or other system resources. This is not fundamentally

different

Quoted 1 line

from any other type of software that may run on a device. Execution

environments

Quoted 1 line

should be carefully designed to only run BPF programs that are trusted or

verified,

Quoted 1 line

and sandboxing and privilege level separation are key strategies for

limiting

Quoted 1 line

security and abuse impact. For example, BPF verifiers are well-known and

widely

Quoted 2 lines

deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and

adhere to

Quoted 1 line

platform-specified API contracts. The details are out of scope of this

document

Quoted 1 line

(but see [LINUX] and [PREVAIL]), but this level of verification can often

provide a

Quoted 1 line

stronger level of security assurance than for other software and operating

system

Quoted 3 lines

code.

Executing programs using the BPF instruction set also requires either an

interpreter

Quoted 1 line

or a JIT compiler to translate them to hardware processor native

instructions. In

Quoted 1 line

general, interpreters are considered a source of insecurity (e.g., gadgets

susceptible

Quoted 1 line

to side-channel attacks due to speculative execution) and are not

recommended.

Quoted 4 lines

Informative References:

[LINUX] "eBPF verifier",

https://www.kernel.org/doc/html/latest/bpf/verifier.html

Quoted 2 lines

[PREVAIL] Elazar Gershuni, Nadav Amit, Arie Gurfinkel, Nina Narodytska,

Jorge

Quoted 1 line

A. Navas, Noam Rinetzky, Leonid Ryzhyk, and Mooly Sagiv. "Simple and

Precise

Quoted 1 line

Static Analysis of Untrusted Linux Kernel Extensions." In Proceedings

of the 40th

Quoted 1 line

ACM SIGPLAN Conference on Programming Language Design and

Implementation,

Quoted 2 lines
   pp. 1069-1084. 2019.

https://pldi19.sigplan.org/details/pldi-2019-papers/44/Simple-and-Precise-St
atic-Analysis-of-Untrusted-Linux-Kernel-Extensions

Dave

#1 lore raw
Quoted 5 lines · On Sat, Apr 20, 2024 at 09:08:56AM -0700, [email protected] wrote:

Per
https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before it can become an RFC.

Quoted 7 lines

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other documents like the "verifier expectations and building blocks for allowing safe execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Proposed text:

Hi Dave,

Thanks for writing this up. Overall it looks great, just had one comment below.

Quoted 17 lines
Quoted 17 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with
memory, CPU, networking, or other system resources. This is not
fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs
that are trusted or verified, and sandboxing and privilege level
separation are key strategies for limiting security and abuse
impact. For example, BPF verifiers are well-known and widely
deployed and are responsible for ensuring that BPF programs will
terminate within a reasonable time, only interact with memory in
safe ways, and adhere to platform-specified API contracts. The
details are out of scope of this document (but see [LINUX] and
[PREVAIL]), but this level of verification can often provide a
stronger level of security assurance than for other software and
operating system code.

Quoted 6 lines
Quoted 6 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Thanks,
David

#2 lore raw
Quoted 8 lines

-----Original Message-----
From: David Vernet <[email protected]>
Sent: Sunday, April 21, 2024 9:52 AM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: BPF ISA Security Considerations section

On Sat, Apr 20, 2024 at 09:08:56AM -0700, [email protected]

Quoted 11 lines · wrote:
Quoted 11 lines

Per
https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before it can become an RFC.

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other documents like the "verifier expectations and building blocks for allowing safe execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Quoted 5 lines
Quoted 1 line

Proposed text:

Hi Dave,

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for other software and operating system code.

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that

this is

Quoted 1 line

explaining how BPF programs are executed, to me it reads a bit as saying,

"It's not

Quoted 1 line

recommended to use BPF." Is it not sufficient to just explain the risks?

It says it's not recommended to use interpreters.
I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines?
It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Do you have a suggested alternate wording?

Dave

#3 lore raw
Quoted 30 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 25 lines
Quoted 18 lines
Quoted 18 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for other software and operating system code.

Quoted 6 lines
Quoted 6 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Quoted 2 lines

Do we need to say that it's not recommended to use JIT engines? Given that

Quoted 8 lines

this is

Quoted 2 lines

explaining how BPF programs are executed, to me it reads a bit as saying,

"It's not

Quoted 1 line

recommended to use BPF." Is it not sufficient to just explain the risks?

It says it's not recommended to use interpreters.
I couldn't tell if your comment was a typo, did you mean interpreters or

JIT

Quoted 2 lines

engines?
It should read as saying it's recommended to use a JIT engine rather than

an

Quoted 3 lines

interpreter.

Do you have a suggested alternate wording?

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

Dave

#4 lore raw
Quoted 55 lines · On Mon, Apr 22, 2024 at 11:38 AM <[email protected]>…
Quoted 30 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 25 lines
Quoted 18 lines
Quoted 18 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for other software and operating system code.

Quoted 6 lines
Quoted 6 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Quoted 2 lines

Do we need to say that it's not recommended to use JIT engines? Given that

Quoted 8 lines

this is

Quoted 2 lines

explaining how BPF programs are executed, to me it reads a bit as saying,

"It's not

Quoted 1 line

recommended to use BPF." Is it not sufficient to just explain the risks?

It says it's not recommended to use interpreters.
I couldn't tell if your comment was a typo, did you mean interpreters or

JIT

Quoted 2 lines

engines?
It should read as saying it's recommended to use a JIT engine rather than

an

Quoted 3 lines

interpreter.

Do you have a suggested alternate wording?

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

Quoted 4 lines

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

I am very confused about the substance of this recommendation. I've also got other comments, but will put those in separate reply.

Simply put JITs aren't magic. Whether a bounds check is put in by a compiler or an interpreter executes it directly, it can still be speculatively bypassed. If anything JITs may simplify the matter compared to interpreters as the execution path maps more closely to the BPF executed, and the BPF will have tighter control of paths and layout if e.g. it is injecting branches to fool the CPU later. There's a wide range of execution technologies that go under the name JIT and interpreter, from threaded code to complete compilation to trace based compilation with bailouts to even more complex schemes. All of them have Specter issues.

Sincerely,
Watson Ladd

Quoted 7 lines

Dave

--
Bpf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/bpf

Signature · 1 line
Astra mortemque praestare gradatim
#12 lore raw
In reply to [email protected]
Quoted 32 lines · On Sat, Apr 20, 2024 at 9:09 AM <[email protected]>…

Per https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before
it can become an RFC.

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other
documents like the "verifier expectations and building blocks for allowing safe
execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Proposed text:

Quoted 3 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with

memory,

Quoted 1 line

CPU, networking, or other system resources. This is not fundamentally

different

Quoted 1 line

from any other type of software that may run on a device. Execution

environments

Quoted 1 line

should be carefully designed to only run BPF programs that are trusted or

verified,

Quoted 1 line

and sandboxing and privilege level separation are key strategies for

limiting

Quoted 1 line

security and abuse impact. For example, BPF verifiers are well-known and

widely

Quoted 2 lines

deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and

Quoted 8 lines

adhere to

Quoted 1 line

platform-specified API contracts. The details are out of scope of this

document

Quoted 1 line

(but see [LINUX] and [PREVAIL]), but this level of verification can often

provide a

Quoted 1 line

stronger level of security assurance than for other software and operating

system

Quoted 1 line

code.

I would put a reference to the other deliverable to say more. If we think that's suboptimal for publication strategy, maybe we can be more generic about it.

Often BPF programs are executed on the other side of a reliability boundary, e.g. if you execute a BPF filter saying drop all on your network card, have fun. This isn't different from firewalls and the like, but it's a new risk that people aren't expecting. I think we might also need to call out that BPF security assurance requires careful design and thought about what is exposed via BPF.

Sincerely,
Watson

Quoted 2 lines

[email protected]
https://www.ietf.org/mailman/listinfo/bpf

Signature · 1 line
Astra mortemque praestare gradatim
#13 lore raw
Quoted 49 lines

-----Original Message-----
From: Watson Ladd <[email protected]>
Sent: Monday, April 22, 2024 12:02 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: [Bpf] BPF ISA Security Considerations section

Quoted 40 lines · On Sat, Apr 20, 2024 at 9:09 AM <[email protected]>…

Per
https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before it can become an RFC.

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other documents like the "verifier expectations and building blocks for allowing safe execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Proposed text:

Quoted 3 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with

memory,

Quoted 2 lines

CPU, networking, or other system resources. This is not fundamentally

different

Quoted 1 line

from any other type of software that may run on a device. Execution

environments

Quoted 2 lines

should be carefully designed to only run BPF programs that are trusted or

verified,

Quoted 1 line

and sandboxing and privilege level separation are key strategies for

limiting

Quoted 2 lines

security and abuse impact. For example, BPF verifiers are well-known and

widely

Quoted 3 lines

deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and

adhere to

Quoted 2 lines

platform-specified API contracts. The details are out of scope of this

document

Quoted 2 lines

(but see [LINUX] and [PREVAIL]), but this level of verification can often

Quoted 8 lines
Quoted 5 lines

provide a

Quoted 2 lines

stronger level of security assurance than for other software and operating

system

Quoted 1 line

code.

I would put a reference to the other deliverable to say more. If we think that's suboptimal for publication strategy, maybe we can be more generic about it.

There's nothing that can be referenced yet. One can only say it's left for future work, would you prefer that?

Quoted 8 lines

Often BPF programs are executed on the other side of a reliability boundary, e.g. if you execute a BPF filter saying drop all on your network card, have fun. This isn't different from firewalls and the like, but it's a new risk that people aren't expecting. I think we might also need to call out that BPF security assurance requires careful design and thought about what is exposed via BPF.

Sincerely,
Watson

Do you have proposed text?

Dave

#5 lore raw
In reply to [email protected]
Quoted 34 lines · On Mon, Apr 22, 2024 at 11:37:48AM -0700, [email protected] wrote:
Quoted 33 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 29 lines
Quoted 18 lines
Quoted 18 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for other software and operating system code.

Quoted 6 lines
Quoted 6 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Quoted 4 lines
Quoted 4 lines

It says it's not recommended to use interpreters. I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines? It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Sorry, yes, I meant to say interpreters. What I really meant though is that discussing the safety of JIT engines vs. interpreters seems a bit out of scope for this Security Considerations section. It's not as though JIT is a foolproof method in and of itself.

Quoted 1 line
Quoted 1 line

Do you have a suggested alternate wording?

How about this:

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters and JIT engines can be a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution, or W^X mappings), and should be audited carefully for vulnerabilities.

Quoted 11 lines

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

This is fine too. My only worry is that there have also been plenty of vulnerabilities exploited against JIT engines as well, so it might be more prudent to just warn the reader of the risks of interpreters/JITs in general as opposed to prescribing one over the other.

What do you think?

Thanks,
David

#6 lore raw
Quoted 8 lines

-----Original Message-----
From: David Vernet <[email protected]>
Sent: Monday, April 22, 2024 12:35 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: BPF ISA Security Considerations section

On Mon, Apr 22, 2024 at 11:37:48AM -0700, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 6 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Security Considerations

Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for

other software

Quoted 14 lines

and operating system code.

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 7 lines
Quoted 7 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines

It says it's not recommended to use interpreters. I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines? It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Sorry, yes, I meant to say interpreters. What I really meant though is

that discussing

Quoted 1 line

the safety of JIT engines vs. interpreters seems a bit out of scope for

this Security

Quoted 1 line

Considerations section. It's not as though JIT is a foolproof method in

and of itself.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Do you have a suggested alternate wording?

How about this:

Executing programs using the BPF instruction set also requires either an

interpreter

Quoted 1 line

or a JIT compiler to translate them to hardware processor native

instructions. In

Quoted 1 line

general, interpreters and JIT engines can be a source of insecurity (e.g.,

gadgets

Quoted 1 line

susceptible to side-channel attacks due to speculative execution, or W^X

mappings),

Quoted 1 line

and should be audited carefully for vulnerabilities.

I've had security researchers tell me that using an interpreter in the same address
space as other confidential data is inherently a vulnerability, i.e., no one can prove
that it's not a side channel attack waiting to happen and all evidence is that it cannot
be protected. Only an interpreter in a separate address space from any secrets
can be safe in that respect. So I believe just saying that interpreters "should be
audited carefully for vulnerabilities" would not pass security muster by such folks.

Quoted 7 lines
Quoted 7 lines

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

Quoted 6 lines
Quoted 4 lines

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

This is fine too. My only worry is that there have also been plenty of

vulnerabilities

Quoted 1 line

exploited against JIT engines as well, so it might be more prudent to just

warn the

Quoted 1 line

reader of the risks of interpreters/JITs in general as opposed to

prescribing one over

Quoted 3 lines

the other.

What do you think?

I think the "should be audited carefully for vulnerabilities" phrase would apply to
JITs for sure. However it would also apply to any non-BPF code in a privileged
context such as a kernel, so it would seem odd to call it out here and not in all other
RFCs that would apply to kernel code (e.g., TCP/IP). But if others really want that,
we could certainly say that.

Dave

#7 lore raw
Quoted 79 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, April 22, 2024 1:26 PM
To: 'David Vernet' <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: BPF ISA Security Considerations section

Quoted 8 lines

-----Original Message-----
From: David Vernet <[email protected]>
Sent: Monday, April 22, 2024 12:35 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: BPF ISA Security Considerations section

On Mon, Apr 22, 2024 at 11:37:48AM -0700, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 6 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Security Considerations

Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for

other software

Quoted 15 lines

and operating system code.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 8 lines
Quoted 8 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative
execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines

It says it's not recommended to use interpreters. I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines? It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Sorry, yes, I meant to say interpreters. What I really meant though is

that discussing

Quoted 2 lines

the safety of JIT engines vs. interpreters seems a bit out of scope for

this Security

Quoted 2 lines

Considerations section. It's not as though JIT is a foolproof method in

and of itself.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Do you have a suggested alternate wording?

How about this:

Executing programs using the BPF instruction set also requires either an

interpreter

Quoted 1 line

or a JIT compiler to translate them to hardware processor native

instructions. In

Quoted 2 lines

general, interpreters and JIT engines can be a source of insecurity (e.g.,

Quoted 7 lines

gadgets

Quoted 2 lines

susceptible to side-channel attacks due to speculative execution, or W^X

mappings),

Quoted 1 line

and should be audited carefully for vulnerabilities.

I've had security researchers tell me that using an interpreter in the

same address

Quoted 1 line

space as other confidential data is inherently a vulnerability, i.e., no

one can prove

Quoted 1 line

that it's not a side channel attack waiting to happen and all evidence is

that it cannot

Quoted 1 line

be protected. Only an interpreter in a separate address space from any

secrets can

Quoted 1 line

be safe in that respect. So I believe just saying that interpreters

"should be audited

Quoted 1 line

carefully for vulnerabilities" would not pass security muster by such

folks.

Quoted 17 lines
Quoted 8 lines
Quoted 8 lines

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

Quoted 6 lines
Quoted 4 lines

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

This is fine too. My only worry is that there have also been plenty of

vulnerabilities

Quoted 2 lines

exploited against JIT engines as well, so it might be more prudent to just

Quoted 8 lines

warn the

Quoted 1 line

reader of the risks of interpreters/JITs in general as opposed to

prescribing one over

Quoted 3 lines

the other.

What do you think?

I think the "should be audited carefully for vulnerabilities" phrase would

apply to JITs

Quoted 1 line

for sure. However it would also apply to any non-BPF code in a privileged

context

Quoted 1 line

such as a kernel, so it would seem odd to call it out here and not in all

other RFCs

Quoted 1 line

that would apply to kernel code (e.g., TCP/IP). But if others really want

that, we

Quoted 1 line

could certainly say that.

Updated proposed text, based on David's and Watson's feedback:

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler
to translate them to hardware processor native instructions. In general, interpreters are considered a
source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution,
or W^X mappings) whenever one is used in the same memory address space as data with confidentiality
concerns. As such, use of a JIT compiler is recommended instead. JIT compilers should be audited
carefully for vulnerabilities to ensure that JIT compilation of a trusted and verified BPF program
does not introduce vulnerabilities.

Dave

#8 lore raw
Quoted 134 lines · On Mon, Apr 22, 2024 at 1:32 PM <[email protected]>…
Quoted 80 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, April 22, 2024 1:26 PM
To: 'David Vernet' <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: BPF ISA Security Considerations section

Quoted 8 lines

-----Original Message-----
From: David Vernet <[email protected]>
Sent: Monday, April 22, 2024 12:35 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: BPF ISA Security Considerations section

On Mon, Apr 22, 2024 at 11:37:48AM -0700, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 6 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Security Considerations

Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for

other software

Quoted 15 lines

and operating system code.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 8 lines
Quoted 8 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative
execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines

It says it's not recommended to use interpreters. I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines? It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Sorry, yes, I meant to say interpreters. What I really meant though is

that discussing

Quoted 2 lines

the safety of JIT engines vs. interpreters seems a bit out of scope for

this Security

Quoted 2 lines

Considerations section. It's not as though JIT is a foolproof method in

and of itself.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Do you have a suggested alternate wording?

How about this:

Executing programs using the BPF instruction set also requires either an

interpreter

Quoted 1 line

or a JIT compiler to translate them to hardware processor native

instructions. In

Quoted 2 lines

general, interpreters and JIT engines can be a source of insecurity (e.g.,

Quoted 7 lines

gadgets

Quoted 2 lines

susceptible to side-channel attacks due to speculative execution, or W^X

mappings),

Quoted 1 line

and should be audited carefully for vulnerabilities.

I've had security researchers tell me that using an interpreter in the

same address

Quoted 1 line

space as other confidential data is inherently a vulnerability, i.e., no

one can prove

Quoted 1 line

that it's not a side channel attack waiting to happen and all evidence is

that it cannot

Quoted 1 line

be protected. Only an interpreter in a separate address space from any

secrets can

Quoted 1 line

be safe in that respect. So I believe just saying that interpreters

"should be audited

Quoted 1 line

carefully for vulnerabilities" would not pass security muster by such

folks.

Quoted 17 lines
Quoted 8 lines
Quoted 8 lines

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

Quoted 6 lines
Quoted 4 lines

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

This is fine too. My only worry is that there have also been plenty of

vulnerabilities

Quoted 2 lines

exploited against JIT engines as well, so it might be more prudent to just

Quoted 8 lines

warn the

Quoted 1 line

reader of the risks of interpreters/JITs in general as opposed to

prescribing one over

Quoted 3 lines

the other.

What do you think?

I think the "should be audited carefully for vulnerabilities" phrase would

apply to JITs

Quoted 1 line

for sure. However it would also apply to any non-BPF code in a privileged

context

Quoted 1 line

such as a kernel, so it would seem odd to call it out here and not in all

other RFCs

Quoted 1 line

that would apply to kernel code (e.g., TCP/IP). But if others really want

that, we

Quoted 1 line

could certainly say that.

Updated proposed text, based on David's and Watson's feedback:

Quoted 13 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler
to translate them to hardware processor native instructions. In general, interpreters are considered a
source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution,
or W^X mappings) whenever one is used in the same memory address space as data with confidentiality
concerns. As such, use of a JIT compiler is recommended instead. JIT compilers should be audited
carefully for vulnerabilities to ensure that JIT compilation of a trusted and verified BPF program
does not introduce vulnerabilities.

But W^X mappings are for JIT (and avoidable by writing, then remapping and executing), not interpreters. How about we just say "Executing the program requires an interpreter or JIT compiler in the same memory space as the system being probed or extended. This creates risks of transient execution attacks that can reveal data with confidentiality concerns. Methods for avoiding these attacks are under active research and frequently depend on microarchitectural details."

Sincerely,
Watson

Quoted 7 lines

Dave

--
Bpf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/bpf

Signature · 1 line
Astra mortemque praestare gradatim
#14 lore raw
In reply to [email protected]
Quoted 50 lines · On Mon, Apr 22, 2024 at 12:06 PM <[email protected]> wrote:
Quoted 50 lines

-----Original Message-----
From: Watson Ladd <[email protected]>
Sent: Monday, April 22, 2024 12:02 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: [Bpf] BPF ISA Security Considerations section

Quoted 40 lines · On Sat, Apr 20, 2024 at 9:09 AM <[email protected]>…

Per
https://authors.ietf.org/en/required-content#security-considerations,
the BPF ISA draft is required to have a Security Considerations section before it can become an RFC.

Below is strawman text that tries to strike a balance between discussing security issues and solutions vs keeping details out of scope that belong in other documents like the "verifier expectations and building blocks for allowing safe execution of untrusted BPF programs" document that is a separate item on the IETF WG charter.

Proposed text:

Quoted 3 lines

Security Considerations

BPF programs could use BPF instructions to do malicious things with

memory,

Quoted 2 lines

CPU, networking, or other system resources. This is not fundamentally

different

Quoted 1 line

from any other type of software that may run on a device. Execution

environments

Quoted 2 lines

should be carefully designed to only run BPF programs that are trusted or

verified,

Quoted 1 line

and sandboxing and privilege level separation are key strategies for

limiting

Quoted 2 lines

security and abuse impact. For example, BPF verifiers are well-known and

widely

Quoted 3 lines

deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and

adhere to

Quoted 2 lines

platform-specified API contracts. The details are out of scope of this

document

Quoted 2 lines

(but see [LINUX] and [PREVAIL]), but this level of verification can often

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

provide a

Quoted 2 lines

stronger level of security assurance than for other software and operating

system

Quoted 1 line

code.

I would put a reference to the other deliverable to say more. If we

think that's

Quoted 1 line
Quoted 1 line

suboptimal for publication strategy, maybe we can be more generic about

it.

Quoted 2 lines

There's nothing that can be referenced yet. One can only say it's left

for future work,

Quoted 1 line

would you prefer that?

I think keeping the existing references while saying "Future work will address this consideration" is best. Let's give the reader something they can use.

Quoted 2 lines
Quoted 2 lines

Often BPF programs are executed on the other side of a reliability

boundary, e.g. if

Quoted 1 line
Quoted 1 line

you execute a BPF filter saying drop all on your network card, have

fun. This isn't

Quoted 1 line
Quoted 1 line

different from firewalls and the like, but it's a new risk that people

aren't expecting. I

Quoted 1 line
Quoted 1 line

think we might also need to call out that BPF security assurance

requires careful

Quoted 6 lines
Quoted 4 lines

design and thought about what is exposed via BPF.

Sincerely,
Watson

Do you have proposed text?

"Exposing functionality via BPF extends the interface between the component executing the BPF and the component submitting it. Careful consideration of what functionality is supposed to be exposed and how that impacts the security properties desired is required."

Does this work? Not sure if we have a good example of this causing problems.

Quoted 3 lines

Dave

Signature · 1 line
Astra mortemque praestare gradatim
Signature · 3 lines
Bpf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/bpf
#9 lore raw
In reply to Watson Ladd
Quoted 156 lines

From: Bpf <[email protected]> on behalf of Watson Ladd <[email protected]>
Sent: Monday, April 22, 2024 5:19 PM
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; David Vernet <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: [EXTERNAL] Re: [Bpf] BPF ISA Security Considerations section

Quoted 134 lines · On Mon, Apr 22, 2024 at 1:32 PM <[email protected]>…
Quoted 80 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, April 22, 2024 1:26 PM
To: 'David Vernet' <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: BPF ISA Security Considerations section

Quoted 8 lines

-----Original Message-----
From: David Vernet <[email protected]>
Sent: Monday, April 22, 2024 12:35 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: BPF ISA Security Considerations section

On Mon, Apr 22, 2024 at 11:37:48AM -0700, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 6 lines · David Vernet
Quoted 2 lines

Thanks for writing this up. Overall it looks great, just had one comment

below.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Security Considerations

Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted or verified, and sandboxing and privilege level separation are key strategies for limiting

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. The details are out of scope of this document (but see [LINUX] and [PREVAIL]), but this level of verification can often provide a stronger level of security assurance than for

other software

Quoted 15 lines

and operating system code.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 8 lines
Quoted 8 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative
execution) and are not recommended.

Do we need to say that it's not recommended to use JIT engines? Given that this is explaining how BPF programs are executed, to me it reads a bit as saying, "It's not recommended to use BPF." Is it not sufficient to just explain the risks?

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines

It says it's not recommended to use interpreters. I couldn't tell if your comment was a typo, did you mean interpreters or JIT engines? It should read as saying it's recommended to use a JIT engine rather than an interpreter.

Sorry, yes, I meant to say interpreters. What I really meant though is

that discussing

Quoted 2 lines

the safety of JIT engines vs. interpreters seems a bit out of scope for

this Security

Quoted 2 lines

Considerations section. It's not as though JIT is a foolproof method in

and of itself.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Do you have a suggested alternate wording?

How about this:

Executing programs using the BPF instruction set also requires either an

interpreter

Quoted 1 line

or a JIT compiler to translate them to hardware processor native

instructions. In

Quoted 2 lines

general, interpreters and JIT engines can be a source of insecurity (e.g.,

Quoted 7 lines

gadgets

Quoted 2 lines

susceptible to side-channel attacks due to speculative execution, or W^X

mappings),

Quoted 1 line

and should be audited carefully for vulnerabilities.

I've had security researchers tell me that using an interpreter in the

same address

Quoted 1 line

space as other confidential data is inherently a vulnerability, i.e., no

one can prove

Quoted 1 line

that it's not a side channel attack waiting to happen and all evidence is

that it cannot

Quoted 1 line

be protected. Only an interpreter in a separate address space from any

secrets can

Quoted 1 line

be safe in that respect. So I believe just saying that interpreters

"should be audited

Quoted 1 line

carefully for vulnerabilities" would not pass security muster by such

folks.

Quoted 17 lines
Quoted 8 lines
Quoted 8 lines

How about:

OLD: In general, interpreters are considered a
OLD: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
OLD: and are not recommended.

Quoted 6 lines
Quoted 4 lines

NEW: In general, interpreters are considered a
NEW: source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution)
NEW: so use of a JIT compiler is recommended instead.

This is fine too. My only worry is that there have also been plenty of

vulnerabilities

Quoted 2 lines

exploited against JIT engines as well, so it might be more prudent to just

Quoted 8 lines

warn the

Quoted 1 line

reader of the risks of interpreters/JITs in general as opposed to

prescribing one over

Quoted 3 lines

the other.

What do you think?

I think the "should be audited carefully for vulnerabilities" phrase would

apply to JITs

Quoted 1 line

for sure. However it would also apply to any non-BPF code in a privileged

context

Quoted 1 line

such as a kernel, so it would seem odd to call it out here and not in all

other RFCs

Quoted 1 line

that would apply to kernel code (e.g., TCP/IP). But if others really want

that, we

Quoted 1 line

could certainly say that.

Updated proposed text, based on David's and Watson's feedback:

Quoted 13 lines

Executing programs using the BPF instruction set also requires either an interpreter or a JIT compiler
to translate them to hardware processor native instructions. In general, interpreters are considered a
source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution,
or W^X mappings) whenever one is used in the same memory address space as data with confidentiality
concerns. As such, use of a JIT compiler is recommended instead. JIT compilers should be audited
carefully for vulnerabilities to ensure that JIT compilation of a trusted and verified BPF program
does not introduce vulnerabilities.

Quoted 7 lines

But W^X mappings are for JIT (and avoidable by writing, then remapping and executing), not interpreters. How about we just say "Executing the program requires an interpreter or JIT compiler in the same memory space as the system being probed or extended. This creates risks of transient execution attacks that can reveal data with confidentiality concerns. Methods for avoiding these attacks are under active research and frequently depend on microarchitectural details."

Is it strictly true that BPF implies either JIT or interpreter? The eBPF for Windows project does ahead of time compilation (AOT), through a process of translating each BPF instruction into an equivalent C statement and then passing it through a C compiler to produce side-channel aware code (and also permit post verification optimization). I believe interpreter or JIT are implementation details and not intrinsic to the ISA.

Regards,
Alan Jowett

Quoted 21 lines

Sincerely,
Watson

Quoted 7 lines

Dave

--
Bpf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/bpf

--
Astra mortemque praestare gradatim

--
Bpf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/bpf

#10 lore raw
In reply to Watson Ladd

Thanks Watson and Alan for continued feedback.

Quoted 2 lines · Watson

But W^X mappings are for JIT (and avoidable by writing, then remapping and executing), not interpreters.

Removed W^X phrase.

Quoted 3 lines

How about we just say "Executing the program requires
an interpreter or JIT compiler in the same memory space as the system being probed or extended.

Execution does not require that the interpreter or JIT compiler is in the same memory space, even if that is the most common implementation. (And Alan's point also applies here that compilation might or might not be JIT per se.)

Below is the latest strawman after taking the latest feedback into account...

-Dave

Security Considerations
=======================

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted and verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. This level of verification can often provide a stronger level of security assurance than for other software and operating system code.
While the details are out of scope of this document,
Linux <https://www.kernel.org/doc/html/latest/bpf/verifier.html>_ and
`PREVAIL <https://pldi19.sigplan.org/details/pldi-2019-papers/44/Simple-and-Precise-Static-Analysis-of-Untrusted-Linux-K Kernel-Extensions>`_ do provide many details. Future IETF work will document verifier expectations
and building blocks for allowing safe execution of untrusted BPF programs.

Executing programs using the BPF instruction set also requires either an interpreter or a compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) whenever one is used in the same memory address space as data with confidentiality concerns. As such, use of a compiler is recommended instead. Compilers should be audited carefully for vulnerabilities to ensure that compilation of a trusted and verified BPF program to native processor instructions does not introduce vulnerabilities.

Exposing functionality via BPF extends the interface between the component executing the BPF program and the component submitting it. Careful consideration of what functionality is exposed and how that impacts the security properties desired is required.

#11 lore raw
Quoted 46 lines · On Tue, Apr 23, 2024 at 10:59:09AM -0700, [email protected] wrote:

Thanks Watson and Alan for continued feedback.

Quoted 2 lines · Watson

But W^X mappings are for JIT (and avoidable by writing, then remapping and executing), not interpreters.

Removed W^X phrase.

Quoted 3 lines

How about we just say "Executing the program requires
an interpreter or JIT compiler in the same memory space as the system being probed or extended.

Execution does not require that the interpreter or JIT compiler is in the same memory space, even if that is the most common implementation. (And Alan's point also applies here that compilation might or might not be JIT per se.)

Below is the latest strawman after taking the latest feedback into account...

-Dave

Security Considerations
=======================

BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, or other system resources. This is not fundamentally different from any other type of software that may run on a device. Execution environments should be carefully designed to only run BPF programs that are trusted and verified, and sandboxing and privilege level separation are key strategies for limiting security and abuse impact. For example, BPF verifiers are well-known and widely deployed and are responsible for ensuring that BPF programs will terminate within a reasonable time, only interact with memory in safe ways, and adhere to platform-specified API contracts. This level of verification can often provide a stronger level of security assurance than for other software and operating system code.
While the details are out of scope of this document,
Linux <https://www.kernel.org/doc/html/latest/bpf/verifier.html>_ and
`PREVAIL <https://pldi19.sigplan.org/details/pldi-2019-papers/44/Simple-and-Precise-Static-Analysis-of-Untrusted-Linux-K Kernel-Extensions>`_ do provide many details. Future IETF work will document verifier expectations
and building blocks for allowing safe execution of untrusted BPF programs.

Executing programs using the BPF instruction set also requires either an interpreter or a compiler to translate them to hardware processor native instructions. In general, interpreters are considered a source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) whenever one is used in the same memory address space as data with confidentiality concerns. As such, use of a compiler is recommended instead. Compilers should be audited carefully for vulnerabilities to ensure that compilation of a trusted and verified BPF program to native processor instructions does not introduce vulnerabilities.

Quoted 3 lines

Exposing functionality via BPF extends the interface between the component executing the BPF program and the component submitting it. Careful consideration of what functionality is exposed and how that impacts the security properties desired is required.

LGTM