This phase I trial is studying the side effects and best dose of sorafenib in treating patients with relapsed or refractory acute myeloid leukemia, acute lymphoblastic leukemia, or chronic myelogenous leukemia. Sorafenib may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth and by blocking blood flow to the cancer