Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An assignment to a position of a tainted array object should propagate the taint information (Aliasing 6) #5

Open
rbonifacio opened this issue Apr 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@rbonifacio
Copy link
Owner

When we assign a position of a tainted array to an object "a", should mark "a" as tainted. Consider the following example:

 protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
       String[] names = req.getParameterValues(FIELD_NAME);
       Object 
       	o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19, o20,
       	o21, o22, o23, o24, o25, o26, o27, o28, o29, o30, o31, o32, o33, o34, o35, o36, o37, o38, o39, o40;
       o1 = o2 = o3 = o4 = o5 = o6 = o7 = o8 = o9 = o10 = o11 = o12 = o13 = o14 = o15 = o16 = o17 = o18 = o19 = o20 =
  	   o21 = o22 = o23 = o24 = o25 = o26 = o27 = o28 = o29 = o30 = o31 = o32 = o33 = o34 = o35 = o36 = o37 = o38 = o39 = o40 =
  		   names[0];
              
       PrintWriter writer = resp.getWriter();
       writer.println(o1);                              /* BAD */
       writer.println(o2);                              /* BAD */
       writer.println(o3);                              /* BAD */
       writer.println(o4);                              /* BAD */
       writer.println(o32);                             /* BAD */
       writer.println(o37);                             /* BAD */
       writer.println(o40);                             /* BAD */
    }

All the o* objects should be marked as tainted.

@rbonifacio rbonifacio added the bug Something isn't working label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant