Skip to contentSkip to conversation

wither bounds checking for networking sysctls

DISCUSSION Rick Jones 3 participants 4 messages Aug 31, 2007 – Sep 9, 2007

Subsystems (2)
lore
Share & tools
lore

Rick Jones

author
#0 lore raw

While messing about with "sysctl_tcp_rto_min" I went back and forth a bit as to whether there should have been bounds checking (as did some of the folks who did some internal review for me). That leads to the question - is it considered worthwhile to add a bit more bounds checking to sundry networking sysctls?

rick jones

#1 lore raw
Quoted 7 lines · On Thu, 30 Aug 2007 18:09:17 -0700 Rick Jones <[email protected]> wrote:

While messing about with "sysctl_tcp_rto_min" I went back and forth a bit as to whether there should have been bounds checking (as did some of the folks who did some internal review for me). That leads to the question - is it considered worthwhile to add a bit more bounds checking to sundry networking sysctls?

rick jones

IMHO As long as the any value from sysctl doesn't crash kernel, we should let it go. Enforcing RFC policy or inter-dependencies seems likes a useless exercise.

author
#2 lore raw
Quoted 4 lines · Stephen Hemminger

On Thu, 30 Aug 2007 18:09:17 -0700
Rick Jones <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

While messing about with "sysctl_tcp_rto_min" I went back and forth a bit as to whether there should have been bounds checking (as did some of the folks who did some internal review for me). That leads to the question - is it considered worthwhile to add a bit more bounds checking to sundry networking sysctls?

rick jones

IMHO As long as the any value from sysctl doesn't crash kernel, we should let it go. Enforcing RFC policy or inter-dependencies seems likes a useless exercise.

I was thinking more along the lines of more fundamental things - like precluding negative values when something is clearly a positive.

rick jones

#3 lore raw
Quoted 14 lines · Rick Jones
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · On Thu, 30 Aug 2007 18:09:17 -0700 Rick Jones <[email protected]> wrote:

While messing about with "sysctl_tcp_rto_min" I went back and forth a bit as to whether there should have been bounds checking (as did some of the folks who did some internal review for me). That leads to the question - is it considered worthwhile to add a bit more bounds checking to sundry networking sysctls?

rick jones

Quoted 6 lines
Quoted 3 lines

IMHO As long as the any value from sysctl doesn't crash kernel, we should let it go. Enforcing RFC policy or inter-dependencies seems likes a useless exercise.

I was thinking more along the lines of more fundamental things - like precluding negative values when something is clearly a positive.

The sysctl infrastructure has some fairly simple support for doing min/max type things. So if it makes sense it isn't hard to make proc_dointvec_minmax the method and then set extra1 to point to the min and extra2 to be the max.

Eric