lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 May 2018 13:12:52 -0700
From:   John Fastabend <john.fastabend@...il.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org
Subject: Re: [bpf-next PATCH 2/2] bpf: add sk_msg prog sk access tests to
 test_verifier

On 05/17/2018 11:57 AM, Martin KaFai Lau wrote:
> On Thu, May 17, 2018 at 08:54:10AM -0700, John Fastabend wrote:
>> Add tests for BPF_PROG_TYPE_SK_MSG to test_verifier for read access
>> to new sk fields.
>>
>> Signed-off-by: John Fastabend <john.fastabend@...il.com>
>> ---


[...]

>> +	{
>> +		"invalid read past end of SK_MSG",
>> +		.insns = {
>> +			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
>> +				    offsetof(struct sk_msg_md, local_port) + 4),
>> +			BPF_EXIT_INSN(),
>> +		},
>> +		.errstr = "",
> no errstr in this case?
> 
>> +		.result = REJECT,
>> +		.prog_type = BPF_PROG_TYPE_SK_MSG,
>> +	},
>> +	{
>> +		"invalid read offset in SK_MSG",
>> +		.insns = {
>> +			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
>> +				    offsetof(struct sk_msg_md, family) + 1),
>> +			BPF_EXIT_INSN(),
>> +		},
>> +		.errstr = "",
> same here.
> 
>> +		.result = REJECT,
>> +		.prog_type = BPF_PROG_TYPE_SK_MSG,
>> +	},
>> +	{
>>  		"direct packet read for SK_MSG",
>>  		.insns = {
>>  			BPF_LDX_MEM(BPF_DW, BPF_REG_2, BPF_REG_1,
>>
> Other than the above,
> 

For completeness I guess we should have the err string
included. I'll send a v2 and push ACKs forward.

> Acked-by: Martin KaFai Lau <kafai@...com>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ