Re: [PATCH] net/packet: initialize val in packet_getsockopt()

2017-04-20 Thread David Miller
From: Alexander Potapenko Date: Tue, 18 Apr 2017 19:47:08 +0200 > In the case getsockopt() is called with PACKET_HDRLEN and zero length, > |val| remains uninitialized and the syscall may behave differently > depending on its value. This doesn't have security consequences (as

Re: [PATCH] net/packet: initialize val in packet_getsockopt()

2017-04-20 Thread David Miller
From: Alexander Potapenko Date: Tue, 18 Apr 2017 19:47:08 +0200 > In the case getsockopt() is called with PACKET_HDRLEN and zero length, > |val| remains uninitialized and the syscall may behave differently > depending on its value. This doesn't have security consequences (as the > uninit bytes

[PATCH] net/packet: initialize val in packet_getsockopt()

2017-04-18 Thread Alexander Potapenko
In the case getsockopt() is called with PACKET_HDRLEN and zero length, |val| remains uninitialized and the syscall may behave differently depending on its value. This doesn't have security consequences (as the uninit bytes aren't copied back), but it's still cleaner to initialize |val|. This bug

[PATCH] net/packet: initialize val in packet_getsockopt()

2017-04-18 Thread Alexander Potapenko
In the case getsockopt() is called with PACKET_HDRLEN and zero length, |val| remains uninitialized and the syscall may behave differently depending on its value. This doesn't have security consequences (as the uninit bytes aren't copied back), but it's still cleaner to initialize |val|. This bug