untrusted should override forbidIFramesContext=3

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

untrusted should override forbidIFramesContext=3

Post by al_9x »

Currently (1.9.9.90), an iframe from an untrusted domain is not blocked if it has the same 2nd level domain as the parent and forbidIFramesContext is 3.

forbidIFramesContext grants implicit trust but untrusted denies trust explicitly, explicit should override implicit
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: untrusted should override forbidIFramesContext=3

Post by Giorgio Maone »

al_9x wrote:Currently (1.9.9.90), an iframe from an untrusted domain is not blocked if it has the same 2nd level domain as the parent and forbidIFramesContext is 3.
"should" is debatable. Could you explain exactly how this is a security weakness?
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: untrusted should override forbidIFramesContext=3

Post by al_9x »

forbidIFramesContext grants implicit trust but untrusted denies trust explicitly, explicit should override implicit, so that's the general principle. Specifically this would allow you to block content from a subdomain on otherwise trusted site.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: untrusted should override forbidIFramesContext=3

Post by al_9x »

another way to put it, is that specific should override general.

example: if you are able to grant/deny trust to hierarchical resources, the more specific denial should and generally does override the the more general grant. If you have a write permission on a folder but a denial on a sub-folder, sub-folder denial wins.

forbidIFramesContext=3 grants (iframe) trust on a more general *.a.b level but untrusted denies on a more specific *.c.a.b
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: untrusted should override forbidIFramesContext=3

Post by Giorgio Maone »

Another way to put it is that forbidIFrameContext helps to define when an IFrame needs to be considered an "object embedding", i.e. extraneous and potentially dangerous content, and when it should be regarded as an integral part of the page, rather than granting or revoking any additional trust.
Specifically this would allow you to block content from a subdomain on otherwise trusted site.
I find this a more compelling and pragmatic argument, so I'm gonna consider a change.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: untrusted should override forbidIFramesContext=3

Post by Giorgio Maone »

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: untrusted should override forbidIFramesContext=3

Post by al_9x »

Giorgio Maone wrote:Please check latest development build
works, thanks
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Post Reply